花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來到素材無憂網(wǎng),按 + 收藏我們
登錄 注冊 退出 找回密碼

Discuz! X3.4主題分類和分類信息偽靜態(tài)設置方法(修改文件實現(xiàn)非

時間: 2019-05-29 11:11 閱讀: 作者:素材無憂網(wǎng)

實現(xiàn)方法:
編輯:
\source\function\function_admincp.php
查找:(約1250~1253行)
  1. if(in_array('forum_forumdisplay', $_G['setting']['rewritestatus'])) {
                            $data['search']['forum_forumdisplay'] = "/".$_G['domain']['pregxprw']['forum']."\?mod\=forumdisplay&(amp;)?fid\=(\w+)(&page\=(\d+))?\"([^\>]*)\>/";
                            $data['replace']['forum_forumdisplay'] = 'rewriteoutput(\'forum_forumdisplay\', 0, $matches[1], $matches[3], $matches[5], $matches[6])';
                    }
    
    

在其下行添加:
  1.         if(in_array('forum_forumdisplay_type', $_G['setting']['rewritestatus'])) {
                $data['search']['forum_forumdisplay_type'] = "/".$_G['domain']['pregxprw']['forum']."\?mod\=forumdisplay&(amp;)?fid\=(\w+)(&typeid\=(\w+))?(&filter\=typeid)?(&typeid\=(\w+))?(&filter\=typeid)?(&page\=(\d+))?\"([^\>]*)\>/e";
                $data['replace']['forum_forumdisplay_type'] = "rewriteoutput('forum_forumdisplay_type', 0, $matches[1], $matches[3], $matches[8], $matches[11], $matches[12])";
            }
復制代碼
查找:(約1299~1302行)
  1. $data['rulesearch']['forum_forumdisplay'] = 'forum-{fid}-{page}.html';
                    $data['rulereplace']['forum_forumdisplay'] = 'forum.php?mod=forumdisplay&fid={fid}&page={page}';
                    $data['rulevars']['forum_forumdisplay']['{fid}'] = '(\w+)';
                    $data['rulevars']['forum_forumdisplay']['{page}'] = '([0-9]+)';
復制代碼
在其下行添加:
  1.         $data['rulesearch']['forum_forumdisplay_type'] = 'forum-{fid}-{typeid}-{page}.html';
            $data['rulereplace']['forum_forumdisplay_type'] = 'forum.php?mod=forumdisplay&fid={fid}&filter=typeid&typeid={typeid}&page={page}';
            $data['rulevars']['forum_forumdisplay_type']['{fid}'] = '(\w+)';
            $data['rulevars']['forum_forumdisplay_type']['{typeid}'] = '(\w+)';
            $data['rulevars']['forum_forumdisplay_type']['{page}'] = '([0-9]+)';
    
    

編輯:
\source\function\function_core.php
查找:(約940~945行)
  1. if($type == 'forum_forumdisplay') {
                    list(,,, $fid, $page, $extra) = func_get_args();
                    $r = array(
                            '{fid}' => empty($_G['setting']['forumkeys'][$fid]) ? $fid : $_G['setting']['forumkeys'][$fid],
                            '{page}' => $page ? $page : 1,
                    );
復制代碼
在其下行添加:
  1.     }
        if($type == 'forum_forumdisplay') {
            list(,,, $fid, $page, $extra) = func_get_args();
            $r = array(
                '{fid}' => empty($_G['setting']['forumkeys'][$fid]) ? $fid : $_G['setting']['forumkeys'][$fid],
                '{page}' => $page ? $page : 1,
            );
        } elseif($type == 'forum_forumdisplay_type') {
            list(,,, $fid, $typeid, $page, $extra) = func_get_args();
            $r = array(
            '{fid}' => empty($_G['setting']['forumkeys'][$fid]) ? $fid : $_G['setting']['forumkeys'][$fid],
            '{typeid}' => $typeid,
            '{page}' => $page ? $page : 1,
            );
    
    

編輯:
/source/language/lang_admincp.php
查找:(約1509行)
'setting_seo_rewritestatus_forum_forumdisplay' => '論壇主題列表頁',
復制代碼
在其下行添加:
'setting_seo_rewritestatus_forum_forumdisplay_type' => '論壇主題分類頁',

勾選提交之后,點擊右上角“查看當前的 Rewrite 規(guī)則”
在你的偽靜態(tài)規(guī)則添加你對應主機類型的相關偽靜態(tài)規(guī)則,
舉個例子,比如
Apache Web Server(虛擬主機用戶)環(huán)境:
.htaccess 添加如下規(guī)則,即可生效。
偽靜態(tài)規(guī)則:
  1. RewriteCond %{QUERY_STRING} ^(.*)$
  2. RewriteRule ^forum-(\w+)-(\w+)-([0-9]+)\.html[        DISCUZ_CODE_160        ]nbsp;forum.php?mod=forumdisplay&fid=$1&filter=typeid&typeid=$2&page=$3&%1

版權聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權益請與我們聯(lián)系,我們將在24小時內刪除!謝謝!

轉載請注明: Discuz! X3.4主題分類和分類信息偽靜態(tài)設置方法(修改文件實現(xiàn)非

標簽:  
相關文章
模板推薦