找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 29|回复: 3

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

[复制链接]

49

主题

197

回帖

583

积分

高级会员

积分
583
发表于 2010-12-30 10:06:52 | 显示全部楼层 |阅读模式
[ol]
  • [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/forum\.php\?mod=forumdisplay&fid=$2&archiver=1
  • RewriteRule ^(.*)/archiver/showtopic-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&archiver=1
  • 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 ^(.*)/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/thread-$2-1-1\.html [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 ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
  • RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=view&aid=$2&page=$3&$4
  • RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$4
  • RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5
  • RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=group&fid=$2&page=$3&$4
  • RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/home\.php\?mod=space&$2=$3&$4
  • RewriteRule ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$ $1/$2\.php\?rewrite=$3&$4[/ol]复制代码IIS的规则想转成apache 求高手,小弟在这里先谢了
  • 回复

    使用道具 举报

    49

    主题

    197

    回帖

    583

    积分

    高级会员

    积分
    583
     楼主| 发表于 2010-12-30 10:12:19 | 显示全部楼层
    有高手吗,帮帮忙

    回复

    使用道具 举报

    149

    主题

    1803

    回帖

    4089

    积分

    论坛元老

    积分
    4089
    发表于 2010-12-30 10:16:44 | 显示全部楼层
    MARK一下,上午要开会没时间,下午还没人弄,我帮你弄。

    [ 本帖最后由 小夜 于 2010-12-30 10:22 编辑 ]
    回复

    使用道具 举报

    138

    主题

    9351

    回帖

    1万

    积分

    论坛元老

    积分
    19170
    发表于 2010-12-30 10:21:18 | 显示全部楼层
    拿去试一下。[ol]
  • RewriteEngine On
  • RewriteBase /
  • RewriteRule ^archiver/showforum-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&archiver=1
  • RewriteRule ^archiver/showtopic-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&archiver=1
  • RewriteRule ^showtree.aspx\?topicid=([0-9]+)&postid=([0-9]+)$ thread-$1-1-1.html [L,R=301]
  • RewriteRule ^showtree.aspx\?postid=([0-9]+)$ thread-$1-1-1.html [L,R=301]
  • RewriteRule ^showforum-([0-9]+)\.html$ forum-$1-1.html [L,R=301]
  • RewriteRule ^showforum-([0-9]+)(?:-([0-9]+))?\.html$ forum-$1-$2.html [L,R=301]
  • RewriteRule ^showforum-([0-9]+)\.aspx$ forum-$1-1.html [L,R=301]
  • RewriteRule ^showforum-([0-9]+)(?:-([0-9]+))?\.aspx$ forum-$1-$2.html [L,R=301]
  • RewriteRule ^showtopic.aspx\?topicid=([0-9]+)$ thread-$1-1-1.html [L,R=301]
  • RewriteRule ^showtopic-([0-9]+)\.html$ thread-$1-1-1.html [L,R=301]
  • RewriteRule ^showtopic-([0-9]+)-([0-9]+)\.html$ thread-$1-$2-1.html [L,R=301]
  • RewriteRule ^showtopic-([0-9]+)(?:-([0-9]+)(?:-([0-9]+))?)?\.html$ thread-$1-$2-$3.html [L,R=301]
  • RewriteRule ^showtopic-([0-9]+)\.aspx$ thread-$1-1-1.html [L,R=301]
  • RewriteRule ^showtopic-([0-9]+)-([0-9]+)\.aspx$ thread-$1-$2-1.html [L,R=301]
  • RewriteRule ^showtopic-([0-9]+)(?:-([0-9]+)(?:-([0-9]+))?)?\.aspx$ thread-$1-$2-$3.html [L,R=301]
  • RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1
  • RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2
  • RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2
  • RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2
  • RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2
  • RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2
  • RewriteRule ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2[/ol]复制代码
  • 回复

    使用道具 举报

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

    本版积分规则

    Archiver|手机版|小黑屋|Discuz! X

    GMT+8, 2025-1-16 00:58 , Processed in 0.018740 second(s), 4 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

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