全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 2010|回复: 4

求高手,帮转个伪静态规则

[复制链接]
发表于 2010-12-30 10:06:52 | 显示全部楼层 |阅读模式
  1. [ISAPI_Rewrite]

  2. # 3600 = 1 hour
  3. CacheClockRate 3600

  4. RepeatLimit 32

  5. # Protect httpd.ini and httpd.parse.errors files
  6. # from accessing through HTTP

  7. RewriteRule ^(.*)/archiver/showforum-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&archiver=1
  8. RewriteRule ^(.*)/archiver/showtopic-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&archiver=1
  9. RewriteRule ^(.*)/showtree.aspx\?topicid=([0-9]+)&postid=([0-9]+)\?*(.*)$ $1/thread-$2-1-1\.html [R]
  10. RewriteRule ^(.*)/showtree.aspx\?postid=([0-9]+)\?*(.*)$ $1/thread-$2-1-1\.html [R]
  11. RewriteRule ^(.*)/showforum-([0-9]+)\.html\?*(.*)$ $1/forum-$2-1\.html [R]
  12. RewriteRule ^(.*)/showforum-([0-9]+)(?:-([0-9]+))?\.html\?*(.*)$ $1/forum-$2-$3\.html [R]
  13. RewriteRule ^(.*)/showforum-([0-9]+)\.aspx\?*(.*)$ $1/forum-$2-1\.html [R]
  14. RewriteRule ^(.*)/showforum-([0-9]+)(?:-([0-9]+))?\.aspx\?*(.*)$ $1/forum-$2-$3\.html [R]
  15. RewriteRule ^(.*)/showtopic.aspx\?topicid=([0-9]+)\?*(.*)$ $1/thread-$2-1-1\.html [R]
  16. RewriteRule ^(.*)/showtopic-([0-9]+)\.html\?*(.*)$ $1/thread-$2-1-1\.html [R]
  17. RewriteRule ^(.*)/showtopic-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/thread-$2-$3-1\.html [R]
  18. RewriteRule ^(.*)/showtopic-([0-9]+)(?:-([0-9]+)(?:-([0-9]+))?)?\.html\?*(.*)$ $1/thread-$2-$3-$4\.html [R]
  19. RewriteRule ^(.*)/showtopic-([0-9]+)\.aspx\?*(.*)$ $1/thread-$2-1-1\.html [R]
  20. RewriteRule ^(.*)/showtopic-([0-9]+)-([0-9]+)\.aspx\?*(.*)$ $1/thread-$2-$3-1\.html [R]
  21. RewriteRule ^(.*)/showtopic-([0-9]+)(?:-([0-9]+)(?:-([0-9]+))?)?\.aspx\?*(.*)$ $1/thread-$2-$3-$4\.html [R]
  22. RewriteRule ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
  23. RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=view&aid=$2&page=$3&$4
  24. RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$4
  25. RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5
  26. RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=group&fid=$2&page=$3&$4
  27. RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/home\.php\?mod=space&$2=$3&$4
  28. RewriteRule ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$ $1/$2\.php\?rewrite=$3&$4
复制代码
IIS的规则想转成apache 求高手,小弟在这里先谢了
 楼主| 发表于 2010-12-30 10:12:19 | 显示全部楼层
有高手吗,帮帮忙
发表于 2010-12-30 10:16:44 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2010-12-30 10:21:18 | 显示全部楼层
MARK一下,上午要开会没时间,下午还没人弄,我帮你弄。

[ 本帖最后由 小夜 于 2010-12-30 10:22 编辑 ]
发表于 2010-12-30 10:49:36 | 显示全部楼层
拿去试一下。
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteRule ^archiver/showforum-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&archiver=1
  4. RewriteRule ^archiver/showtopic-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&archiver=1
  5. RewriteRule ^showtree.aspx\?topicid=([0-9]+)&postid=([0-9]+)$ thread-$1-1-1.html [L,R=301]
  6. RewriteRule ^showtree.aspx\?postid=([0-9]+)$ thread-$1-1-1.html [L,R=301]
  7. RewriteRule ^showforum-([0-9]+)\.html$ forum-$1-1.html [L,R=301]
  8. RewriteRule ^showforum-([0-9]+)(?:-([0-9]+))?\.html$ forum-$1-$2.html [L,R=301]
  9. RewriteRule ^showforum-([0-9]+)\.aspx$ forum-$1-1.html [L,R=301]
  10. RewriteRule ^showforum-([0-9]+)(?:-([0-9]+))?\.aspx$ forum-$1-$2.html [L,R=301]
  11. RewriteRule ^showtopic.aspx\?topicid=([0-9]+)$ thread-$1-1-1.html [L,R=301]
  12. RewriteRule ^showtopic-([0-9]+)\.html$ thread-$1-1-1.html [L,R=301]
  13. RewriteRule ^showtopic-([0-9]+)-([0-9]+)\.html$ thread-$1-$2-1.html [L,R=301]
  14. RewriteRule ^showtopic-([0-9]+)(?:-([0-9]+)(?:-([0-9]+))?)?\.html$ thread-$1-$2-$3.html [L,R=301]
  15. RewriteRule ^showtopic-([0-9]+)\.aspx$ thread-$1-1-1.html [L,R=301]
  16. RewriteRule ^showtopic-([0-9]+)-([0-9]+)\.aspx$ thread-$1-$2-1.html [L,R=301]
  17. RewriteRule ^showtopic-([0-9]+)(?:-([0-9]+)(?:-([0-9]+))?)?\.aspx$ thread-$1-$2-$3.html [L,R=301]
  18. RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1
  19. RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2
  20. RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2
  21. RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2
  22. RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2
  23. RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2
  24. RewriteRule ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2
复制代码

评分

参与人数 1威望 +7 收起 理由
artyi + 7 谢谢!~~

查看全部评分

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

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-5-6 18:38 , Processed in 0.056305 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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