欧美日韩精品在线,国内精品久久久久久久久,一级毛片恃级毛片直播,清纯唯美亚洲综合欧美色

PhpWind教程:解除dz轉換后的流量丟失之——全面Rewrite規(guī)則(適用iis)_PhpWind教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!

本主題是適用有獨立主機權限的,從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教程/更新時間:2012-06-04
相關PhpWind教程