论坛转换网's Archiver

白乐天 发表于 2009-6-16 20:02

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

ouran 发表于 2009-6-17 15:26

好东西啊,谢谢。能告诉我下载下来怎么用吗 我是新手

ouran 发表于 2009-6-17 15:37

呵呵,我知道,原来这么简单。可惜原来的收录已经流失的差不多了。

jseric 发表于 2009-7-16 10:58

这个放在哪里的???

白乐天 发表于 2009-7-16 19:08

放在论坛所在目录下

mingsong 发表于 2009-12-14 21:34

我在NT里可以开启此功能,可到DZ里变成无法显示了。
IIS也设置好了。

白乐天 发表于 2009-12-14 22:27

[quote]我在NT里可以开启此功能,可到DZ里变成无法显示了。
IIS也设置好了。
说明你IIS没设置好。

mingsong 发表于 2009-12-15 12:54

[attach]103[/attach]

mingsong 发表于 2009-12-15 12:55

isapi筛选器能看到成功启动了。

白乐天 发表于 2009-12-15 13:21

httpd.ini有正确配置么,路径不要放错。

mingsong 发表于 2009-12-15 14:02

我直接将httpd.ini下载后放在论坛目录下。
论坛目录为:E:\BBS
httpd.ini就放在bbs目录下。
我没有做任何的修改。
Rewrite.dll在DZ.NET网站下载的。

白乐天 发表于 2009-12-15 14:59

[url]http://faq.comsenz.com/viewnews-11[/url]

mingsong 发表于 2009-12-15 16:19

谢谢,应该是Rewrite.dll有问题。
已经解决。

frank324 发表于 2010-5-6 16:14

我原来dznt是用“.aspx”作为静态页的,不是以“html”做伪静态

能用你现在这个规则吗

白乐天 发表于 2010-5-6 16:26

能用。

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.