Win主机伪静态httpd.ini文件DZ、PW论坛


我的是虚拟空间,win 2003 SP服务器,尝试了论坛上提供的.htaccess文件、web.config.ini文件和httpd.ini文件都失败了。

后来求助空间商,给了我一个httpd.ini文件才终于成功生产伪静态。

现在拿出来分享一下,也许适合你的空间使用,但前提是你的空间有组件支持rewrite哦。

还包括了PhpWind生成伪静态的规则哦。将上面代码复制到记事本保存为httpd.ini文件,然后上传到你的空间的根目录下就OK了(记得是根目录哦,你安装的即使是在子目录下httpd.ini文件也要放到根目录里,我试了只在根目录下可行)。

Copy to ClipboardLiehuo.Net Codes引用的内容:[www.veryhuo.com] [ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Discuz Rewrite规则
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 ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4
RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag\.php\?name=$2&$3

# PhpWind Rewrite规则
RewriteRule ^(.*)-htm-(.*)$ $1\.php\?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index\.php\?$2

相关内容