1.首先安装 IIS_Rewrite (点击下载[此版本可以同时满足DZ与PHPWIND静态化]) a.压缩后,随意放到某一分区下,确保目录有everyone读/运行权限 b.在IIS->网站(属性)->ISAPI筛选器(添加rewrite.dll)
2.配置IIS_Rewrite a.在http.ini添加
[ISAPI_Rewrite]
# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2
#dz+ss完整静态化设置[上面两行是PHPWIND语法]
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2
RewriteRule ^(.*)/archiver/((fid|tid)-[0-9]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$4
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
RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag\.php\?name=$2&$3
RewriteRule ^(.*)/?uid/([0-9]+)$ $1$2 [L]
RewriteRule ^(.*)/([0-9]+)$ $1/index\.php\?uid-$2 [L]
RewriteRule ^(.*)/([0-9]+)/spacelist(.+)$ $1/index\.php\?uid/$2/action/spacelist/type$3 [L]
RewriteRule ^(.*)/([0-9]+)/viewspace(.+)$ $1/index\.php\?uid/$2/action/viewspace/itemid$3 [L]
RewriteRule ^(.*)/([0-9]+)/viewbbs(.+)$ $1/index\.php\?uid/$2/action/viewbbs/tid$3 [L]
RewriteRule ^(.*)/([0-9]+)/$ $1/index\.php\?uid-$2 [L]
RewriteRule ^(.*)/([0-9]+)/action-(.+)$ $1/index\.php\?uid-$2-action-$3 [L]
RewriteRule ^(.*)/action-(.+)$ $1/index\.php\?action-$2 [L]
RewriteRule ^(.*)/category-(.+)$ $1/index\.php\?action/category/catid-$2 [L]
RewriteRule ^(.*)/viewnews-(.+)$ $1/index\.php\?action/viewnews/itemid-$2 [L]
RewriteRule ^(.*)/viewthread-(.+)$ $1/index\.php\?action/viewthread/tid-$2 [L]
RewriteRule ^(.*)/mygroup-(.+)$ $1/index\.php\?action/mygroup/gid-$2 [L]
3.设置PHPWIND
a.利用管理员用户登陆后台->静态目录部署
是否开启静态目录部署功能 是
静态目录 -htm-
静态目录扩展名设置 .html
4.启动IIS(完毕)
|