Win2003服務(wù)器 IIS6.0 rewrite的設(shè)置圖文教程
更新時(shí)間: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ī)則
# 獨(dú)立主機(jī)用戶
# 修改以下語句中的 /supesite 修改為你的SupeSite目錄地址,如果程序放在根目錄中,請(qǐng)將 /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]
為保險(xiǎn)起見,給目錄everyone 運(yùn)行和讀取的權(quán)限。
在IIS管理器里找到SS站點(diǎn),右鍵選屬性。
在 ISAPI 篩選器里添加,規(guī)則你可以自己取名,這里我填rewrite 。
確定后,將網(wǎng)站停止再啟動(dòng),在屬性ISAPI 篩選器里看到所加的規(guī)則已經(jīng)出現(xiàn)綠色的箭頭。
論壇刷新一下就可以看到頁面已經(jīng)靜態(tài)化了。
進(jìn)入SS/XS后臺(tái),系統(tǒng)設(shè)置里選取rewrite 模式,更新緩存。
頁面靜態(tài)化了,但是論壇帖子還是動(dòng)態(tài)頁面。
在SS/XS后臺(tái)系統(tǒng)設(shè)置里,選站點(diǎn)模式就完全靜態(tài)化。
看看個(gè)人空間,地址里的小問號(hào)已經(jīng)沒有了。
特別提示:例子里的SS與論壇安裝在一起,SS在根目錄,論壇在子目錄。
本地下載
復(fù)制代碼 代碼如下:
[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ī)則
# 獨(dú)立主機(jī)用戶
# 修改以下語句中的 /supesite 修改為你的SupeSite目錄地址,如果程序放在根目錄中,請(qǐng)將 /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]

為保險(xiǎn)起見,給目錄everyone 運(yùn)行和讀取的權(quán)限。


在IIS管理器里找到SS站點(diǎn),右鍵選屬性。


在 ISAPI 篩選器里添加,規(guī)則你可以自己取名,這里我填rewrite 。


確定后,將網(wǎng)站停止再啟動(dòng),在屬性ISAPI 篩選器里看到所加的規(guī)則已經(jīng)出現(xiàn)綠色的箭頭。


論壇刷新一下就可以看到頁面已經(jīng)靜態(tài)化了。


進(jìn)入SS/XS后臺(tái),系統(tǒng)設(shè)置里選取rewrite 模式,更新緩存。


頁面靜態(tài)化了,但是論壇帖子還是動(dòng)態(tài)頁面。


在SS/XS后臺(tái)系統(tǒng)設(shè)置里,選站點(diǎn)模式就完全靜態(tài)化。


看看個(gè)人空間,地址里的小問號(hào)已經(jīng)沒有了。

特別提示:例子里的SS與論壇安裝在一起,SS在根目錄,論壇在子目錄。
相關(guān)文章
IIS、Apache、Nginx下用IE下載apk文件變成zip的解決辦法
有時(shí)候我們下載安卓應(yīng)用文件apk的時(shí)候,用IE瀏覽器下載,擴(kuò)展名就被自動(dòng)被重命名成了“xxx.zip”,拷貝到手機(jī)上無法安裝。2014-05-05建立Apache+PHP+MySQL數(shù)據(jù)庫驅(qū)動(dòng)的動(dòng)態(tài)網(wǎng)站
Apache是目前應(yīng)用最廣的Web服務(wù)器,PHP3是一種類似ASP的腳本語言,目前的發(fā)展趨勢(shì)大有超過Perl之勢(shì),而MySQL是一個(gè)輕量級(jí)的數(shù)據(jù)庫系統(tǒng),特別是用于網(wǎng)站建設(shè),這3個(gè)軟件均是自由軟件,是架設(shè)數(shù)據(jù)庫驅(qū)動(dòng)的動(dòng)態(tài)網(wǎng)站的最佳排檔。2008-03-03如何規(guī)劃一個(gè)高容量的Apache服務(wù)器
為了規(guī)劃一個(gè)高容量的WEB服務(wù)器,我們分成以下環(huán)節(jié)來做: 一:網(wǎng)絡(luò)環(huán)境 —— —— | |(eth0:192.168.11.8) | |(eth0:a.b.c.d) | A |——————--------------| B|------------->ISP —— (eth1:192.168.11.5)—— web.company.com firewall.company.com2008-03-03apache五合一程序建立PHP+CGI運(yùn)行環(huán)境
apache五合一程序建立PHP+CGI運(yùn)行環(huán)境...2006-10-10Asp.Net權(quán)限管理系統(tǒng) 專用代碼生成工具(DDBuildTools) 1.1.0 下載
配置之前,但是是去找個(gè)合適的地方下載?,F(xiàn)在,PHP已經(jīng)發(fā)展到PHP4了,所以,我只是將PHP4的安裝配置介紹給大家,其實(shí)PHP3的配置和PHP4是差不多的。另外,考慮到我本人用Linux用得少,而且,絕大多數(shù)人用win系統(tǒng),所以,在本站只將win下的配置。2008-03-03Win+Apache+PHP+MySQL+Tcomcat配置
2008-03-03Win2003服務(wù)器 IIS6.0 rewrite的設(shè)置圖文教程
Win2003服務(wù)器 IIS6.0 rewrite的設(shè)置圖文教程...2007-07-07