歡迎您光臨本站 註冊首頁

discuz重寫規則的疑問

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

discuz重寫規則的疑問

請看以下discuz論壇偽靜態重寫規則
RewriteEngine on
RewriteRule        ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$                        $1/archiver/index.php?$2
RewriteRule        ^(.*)/forum-(+)-(+)\.html$                            $1/forumdisplay.php?fid=$2&page=$3
RewriteRule        ^(.*)/thread-(+)-(+)-(+)\.html$             $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule        ^(.*)/space-(username|uid)-(.+)\.html$                       $1/space.php?$2=$3
RewriteRule        ^(.*)/tag-(.+)\.html$                                                    $1/tag.php?name=$2
確實好用

疑問:RewirteRule語法應該是匹配前面的url則用後面的url重寫
但是discuz的重寫規則為什麼是類似forum-2-1.html的url在規則里是寫在前面的,為什麼是這樣?
《解決方案》

暈,我明白了,他是在論壇後台開啟了靜態
然後訪問類似forum-2-1.html的地址自動重寫為forumdisplay.php?fid=2&page=1
原來是這意思,理解錯誤,哈
《解決方案》

暈,我明白了,他是在論壇後台開啟了靜態
然後訪問類似forum-2-1.html的地址自動重寫為forumdisplay.php?fid=2&page=1
原來是這意思,理解錯誤,哈

[火星人 ] discuz重寫規則的疑問已經有283次圍觀

http://coctec.com/docs/service/show-post-30995.html