Discuz!NT=>Discuz! 7.0保持搜索引擎带来的流量之rewrite 规则
将下列内容保存为httpd.ini,或者直接下载附件包即可。此规则IIS适用,apache用户可据此稍作修改。[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^(.*)/archiver/showforum-([0-9]+)\.html\?*(.*)$ $1/archiver/fid-$2\.html [R]
RewriteRule ^(.*)/archiver/showtopic-([0-9]+)\.html\?*(.*)$ $1/archiver/tid-$2\.html [R]
RewriteRule ^(.*)/attachment.aspx\?attachmentid=([0-9]+)\?*(.*)$ $1/attachment\.php\?aid=$2 [R]
RewriteRule ^(.*)/onlineuser.aspx\?*(.*)$ $1/member\.php\?action=online [R]
RewriteRule ^(.*)/showtree.aspx\?topicid=([0-9]+)&postid=([0-9]+)\?*(.*)$ $1/thread-$2-1-1\.html [R]
RewriteRule ^(.*)/showtree.aspx\?postid=([0-9]+)\?*(.*)$ $1/thread-$2-1-1\.html [R]
RewriteRule ^(.*)/register\.aspx\?*(.*)$ $1/register\.php [R]
RewriteRule ^(.*)/login\.aspx\?*(.*)$ $1/logging\.php\?action=login [R]
RewriteRule ^(.*)/showforum-([0-9]+)\.html\?*(.*)$ $1/forum-$2-1\.html [R]
RewriteRule ^(.*)/showforum-([0-9]+)(?:-([0-9]+))?\.html\?*(.*)$ $1/forum-$2-$3\.html [R]
RewriteRule ^(.*)/showforum-([0-9]+)\.aspx\?*(.*)$ $1/forum-$2-1\.html [R]
RewriteRule ^(.*)/showforum-([0-9]+)(?:-([0-9]+))?\.aspx\?*(.*)$ $1/forum-$2-$3\.html [R]
RewriteRule ^(.*)/showtopic.aspx\?topicid=([0-9]+)\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3&$4 [R]
RewriteRule ^(.*)/showtopic-([0-9]+)\.html\?*(.*)$ $1/thread-$2-1-1\.html [R]
RewriteRule ^(.*)/showtopic-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/thread-$2-$3-1\.html [R]
RewriteRule ^(.*)/showtopic-([0-9]+)(?:-([0-9]+)(?:-([0-9]+))?)?\.html\?*(.*)$ $1/thread-$2-$3-$4\.html [R]
RewriteRule ^(.*)/showtopic-([0-9]+)\.aspx\?*(.*)$ $1/thread-$2-1-1\.html [R]
RewriteRule ^(.*)/showtopic-([0-9]+)-([0-9]+)\.aspx\?*(.*)$ $1/thread-$2-$3-1\.html [R]
RewriteRule ^(.*)/showtopic-([0-9]+)(?:-([0-9]+)(?:-([0-9]+))?)?\.aspx\?*(.*)$ $1/thread-$2-$3-$4\.html [R]
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
好东西啊,谢谢。能告诉我下载下来怎么用吗 我是新手
呵呵,我知道,原来这么简单。可惜原来的收录已经流失的差不多了。
这个放在哪里的???
放在论坛所在目录下
我在NT里可以开启此功能,可到DZ里变成无法显示了。
IIS也设置好了。
[quote]我在NT里可以开启此功能,可到DZ里变成无法显示了。
IIS也设置好了。
说明你IIS没设置好。
[attach]103[/attach]
isapi筛选器能看到成功启动了。
httpd.ini有正确配置么,路径不要放错。
我直接将httpd.ini下载后放在论坛目录下。
论坛目录为:E:\BBS
httpd.ini就放在bbs目录下。
我没有做任何的修改。
Rewrite.dll在DZ.NET网站下载的。 [url]http://faq.comsenz.com/viewnews-11[/url] 谢谢,应该是Rewrite.dll有问题。
已经解决。 我原来dznt是用“.aspx”作为静态页的,不是以“html”做伪静态
能用你现在这个规则吗 能用。
页:
[1]