Win2003服務器 IIS6.0 rewrite的設置圖文教程
更新時間:2007年07月07日 00:00:00 作者:
首先下載rewrite.rar 的附件,解壓到任意盤上的任意目錄,我解壓到rewrite-ss。
本地下載
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$3
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay\.php\?fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3&$4
RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html\?*(.*)$ $1/viewpro\.php\?$2=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4
RewriteCond Host: (.+)
RewriteCond Referer: (?!http://\1.*).*
RewriteRule .*\.(?:gif|jpg|png) /block.gif [I,O]
# SupeSite Rewrite規(guī)則
# 獨立主機用戶
# 修改以下語句中的 /supesite 修改為你的SupeSite目錄地址,如果程序放在根目錄中,請將 /supesite 修改為 /
RewriteRule ^/([0-9]+)/spacelist(.+)$ /index\.php\?uid/$1/action/spacelist/type$2 [L]
RewriteRule ^/([0-9]+)/viewspace(.+)$ /index\.php\?uid/$1/action/viewspace/itemid$2 [L]
RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index\.php\?uid/$1/action/viewbbs/tid$2 [L]
RewriteRule ^/([0-9]+)/(.*)$ /index\.php\?uid/$1/$2 [L]
RewriteRule ^/([0-9]+)$ /index\.php\?uid/$1 [L]
RewriteRule ^/action(.+)$ /index\.php\?action$1 [L]
RewriteRule ^/category(.+)$ /index\.php\?action/category/catid$1 [L]
RewriteRule ^/viewnews(.+)$ /index\.php\?action/viewnews/itemid$1 [L]
RewriteRule ^/viewthread(.+)$ /index\.php\?action/viewthread/tid$1 [L]
RewriteRule ^/mygroup(.+)$ /index\.php\?action/mygroup/gid$1 [L]
RewriteRule ^/index(.*)$ /index\.php [L]
為保險起見,給目錄everyone 運行和讀取的權限。
在IIS管理器里找到SS站點,右鍵選屬性。
在 ISAPI 篩選器里添加,規(guī)則你可以自己取名,這里我填rewrite 。
確定后,將網(wǎng)站停止再啟動,在屬性ISAPI 篩選器里看到所加的規(guī)則已經(jīng)出現(xiàn)綠色的箭頭。
論壇刷新一下就可以看到頁面已經(jīng)靜態(tài)化了。
進入SS/XS后臺,系統(tǒng)設置里選取rewrite 模式,更新緩存。
頁面靜態(tài)化了,但是論壇帖子還是動態(tài)頁面。
在SS/XS后臺系統(tǒng)設置里,選站點模式就完全靜態(tài)化。
看看個人空間,地址里的小問號已經(jīng)沒有了。
特別提示:例子里的SS與論壇安裝在一起,SS在根目錄,論壇在子目錄。
本地下載
復制代碼 代碼如下:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$3
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay\.php\?fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3&$4
RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html\?*(.*)$ $1/viewpro\.php\?$2=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4
RewriteCond Host: (.+)
RewriteCond Referer: (?!http://\1.*).*
RewriteRule .*\.(?:gif|jpg|png) /block.gif [I,O]
# SupeSite Rewrite規(guī)則
# 獨立主機用戶
# 修改以下語句中的 /supesite 修改為你的SupeSite目錄地址,如果程序放在根目錄中,請將 /supesite 修改為 /
RewriteRule ^/([0-9]+)/spacelist(.+)$ /index\.php\?uid/$1/action/spacelist/type$2 [L]
RewriteRule ^/([0-9]+)/viewspace(.+)$ /index\.php\?uid/$1/action/viewspace/itemid$2 [L]
RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index\.php\?uid/$1/action/viewbbs/tid$2 [L]
RewriteRule ^/([0-9]+)/(.*)$ /index\.php\?uid/$1/$2 [L]
RewriteRule ^/([0-9]+)$ /index\.php\?uid/$1 [L]
RewriteRule ^/action(.+)$ /index\.php\?action$1 [L]
RewriteRule ^/category(.+)$ /index\.php\?action/category/catid$1 [L]
RewriteRule ^/viewnews(.+)$ /index\.php\?action/viewnews/itemid$1 [L]
RewriteRule ^/viewthread(.+)$ /index\.php\?action/viewthread/tid$1 [L]
RewriteRule ^/mygroup(.+)$ /index\.php\?action/mygroup/gid$1 [L]
RewriteRule ^/index(.*)$ /index\.php [L]
為保險起見,給目錄everyone 運行和讀取的權限。
在IIS管理器里找到SS站點,右鍵選屬性。
在 ISAPI 篩選器里添加,規(guī)則你可以自己取名,這里我填rewrite 。
確定后,將網(wǎng)站停止再啟動,在屬性ISAPI 篩選器里看到所加的規(guī)則已經(jīng)出現(xiàn)綠色的箭頭。
論壇刷新一下就可以看到頁面已經(jīng)靜態(tài)化了。
進入SS/XS后臺,系統(tǒng)設置里選取rewrite 模式,更新緩存。
頁面靜態(tài)化了,但是論壇帖子還是動態(tài)頁面。
在SS/XS后臺系統(tǒng)設置里,選站點模式就完全靜態(tài)化。
看看個人空間,地址里的小問號已經(jīng)沒有了。
特別提示:例子里的SS與論壇安裝在一起,SS在根目錄,論壇在子目錄。
相關文章
linux下安裝apache與php;Apache+PHP+MySQL配置攻略
linux下安裝apache與php;Apache+PHP+MySQL配置攻略...2007-05-05
linux下編譯安裝kangle web server教程詳解
這篇文章主要介紹了如果在linux下編譯安裝kangle web server,操作簡單,對初學者很有幫助2017-12-12

