Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[经验] Discuz!NT=>Discuz! 7.0保持搜索引擎带来的流量之rewrite 规则

[复制链接]
白乐天 发表于 2009-6-16 20:07:06 | 显示全部楼层 |阅读模式
将下列内容保存为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

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

评分

2

查看全部评分

幸福在右 发表于 2009-6-17 08:34:14 | 显示全部楼层
支持
回复

使用道具 举报

桃子(小敏) 发表于 2009-6-17 09:01:50 | 显示全部楼层
回复

使用道具 举报

ynluntan 发表于 2009-6-17 09:38:15 | 显示全部楼层
查了一个晚上,相关说明,什么都搞不明白,无奈,放弃算了
回复

使用道具 举报

江湖大虾仁 发表于 2009-6-17 09:53:15 | 显示全部楼层
白老大啊
好久不见了~~~
回复

使用道具 举报

1G空间100元 发表于 2009-6-17 12:09:26 | 显示全部楼层
看看
回复

使用道具 举报

蓝豆 发表于 2009-6-17 16:13:04 | 显示全部楼层
这个要顶
回复

使用道具 举报

设备人 发表于 2009-8-1 22:14:24 | 显示全部楼层
正在困惑的,谢谢你的帮助。
回复

使用道具 举报

clubking 发表于 2010-2-1 11:53:48 | 显示全部楼层
看不懂,不能用301实现吗
回复

使用道具 举报

coowed 发表于 2010-2-1 12:05:16 | 显示全部楼层
如果转到7.2也可以用吗?规则和7.0是一样得吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-10-3 19:24 , Processed in 0.146904 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表