首页 > WordPress技巧, 空间域名 > windows虚拟主机IIS Rewrite设置,开启discuz的URL静态化

windows虚拟主机IIS Rewrite设置,开启discuz的URL静态化

2009年12月23日 发表评论 阅读评论

windows虚拟主机,要开启discuz的URL静态化(传说中可以优化搜索引擎的抓取),复制以下代码保存为 http.ini,上传到网站根目录,然后到论坛后台开启即可,直接复制请注意中英文标点

[ ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.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

上述代码经过测试,完全OK,成功开启了iis的rewrite,实现了discuz伪静态。

» 本文链接地址:http://wubangtu.com/14 »英雄不问来路,转载请注明出处,谢谢。
» 您也可以订阅本站:http://feed.wubangtu.com

  1. 小谁
    2011年7月12日10:09 | #1

    老师您好 我还有一些关于wordpress的问题 方便近距离请教一下吧 请加一下我的QQ好吗? 非常感谢!我的qq是1347089670

  1. 本文目前尚无任何 trackbacks 和 pingbacks.