PhpWind教程:解除dz轉換后的流量丟失之——全面Rewrite規(guī)則(適用iis)_PhpWind教程
本主題是適用有獨立主機權限的,從DZ轉換過來的用戶
轉換前是像這樣的:
archiver/fid-79-page-1.html
forum-136-1.html
thread-1401-1-1.html
forumdisplay.php?fid=6
viewthread.php?tid=124336
轉換后都能實現(xiàn)
請先做一下步驟:
把thread.php復制一份改名為forumdisplay.php
把read.php復制一份改名為viewthread.php
這樣省事省時,保證動態(tài)地址訪問正常,接下去開始偽靜態(tài)重寫規(guī)則
這兩步還是做了比較好,無論有沒權限都好做的
IIS的規(guī)則和Apache稍有不同
httpd.ini中代碼如下,復制粘帖即可
[ISAPI_Rewrite]
# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
RewriteRule ^(.*)/archiver/ /simple/ [R]
RewriteRule ^(.*)/fid-(\d+)\.html /simple/index.php\?f$2.html [R]
RewriteRule ^(.*)/fid-(\d+)-page-1.html /simple/index.php\?f$2.html [R]
RewriteRule ^(.*)/tid-(\d+)-page-1.html /simple/index.php\?t$2.html [R]
RewriteRule ^(.*)thread-(\d+)-(\d+)-(\d+)\.html $1/read.php?tid=$2
RewriteRule ^(.*)forum-(\d+)-(\d+)\.html $1/thread.php?fid=$2
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2
研究過程中服務器的iis就是不聽使喚,亂套規(guī)則,
然后請來了技術重裝了Rewrite模塊,之后就好啦!
如果IIS沒有安裝ISAPI篩選器 請看教程:http://www.phpwind.net/read.php?tid=671630
如果IIS的重寫出現(xiàn)問題,可以參考此帖的做法,
我的IIS下設置靜態(tài)目錄的方法http://www.phpwind.net/read-htm-tid-166136.html
重新安裝一下ISAPI篩選器
如果您發(fā)現(xiàn)以上不適用,可以參考此帖
解除轉換后的流量丟失之——全面Rewrite規(guī)則http://www.phpwind.net/read-htm-tid-636480.html
無獨立服務器權限的話
把thread.php復制一份改名為forumdisplay.php
把read.php復制一份改名為viewthread.php
這樣省事省時,保證動態(tài)地址訪問正常
查看更多 PhpWind教程 PhpWind模板風格
- PhpWind教程:PHPWind forum V7.5 SP1 使用與修復說明
- PhpWind教程:PHPWind Forum V7.5 升級教程
- PHPWind7.3 升級7.3.2 圖文教程
- PhpWind教程:sitemap生成問題
- PhpWind教程:熱榜排行 for 75
- PHPwind 6.3.2升級至PHPwind 7.3.2 圖文教程
- PHPWind 7.0 升級至PHPwind 7.3.2 圖文教程
- PHPWind 7.0 升級到PHPwind v7.3 圖文教程
- PHPWind 6.3.2升級到 PHPwind v7.3 圖文教程
- PHPWind6.3.2升級PHPWind7.0說明教程
- PhpWind教程:PHPWind6.3(6.3rc、6.3) to PHPWind6.3.2升級教程
- PhpWind教程:PHPWind6.x(6.0rc、6.0) to PHPWind6.3.2升級教程
- 相關鏈接:
- 教程說明:
PhpWind教程-PhpWind教程:解除dz轉換后的流量丟失之——全面Rewrite規(guī)則(適用iis)。