Win主机伪静态httpd.ini文件DZ、PW论坛
发布时间:2021-03-18 18:31:06 所属栏目:教程 来源:网络整理
导读:我的是虚拟空间,win 2003 SP服务器,尝试了论坛上提供的.htaccess文件、web.config.ini文件和httpd.ini文件都失败了。 后来求助空间商,给了我一个httpd.ini文件才终于成功生产伪静态。 现在拿出来分享一下,也许适合你的空间使用,但前提是你的空间有组件
我的是虚拟空间,win 2003 SP服务器,尝试了论坛上提供的.htaccess文件、web.config.ini文件和httpd.ini文件都失败了。 后来求助空间商,给了我一个httpd.ini文件才终于成功生产伪静态。 现在拿出来分享一下,也许适合你的空间使用,但前提是你的空间有组件支持rewrite哦。 还包括了PhpWind生成伪静态的规则哦。将上面代码复制到记事本保存为httpd.ini文件,然后上传到你的空间的根目录下就OK了(记得是根目录哦,你安装的即使是在子目录下httpd.ini文件也要放到根目录里,我试了只在根目录下可行)。 [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 (编辑:好传媒网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |