全球主机交流论坛
标题:
求高手,帮转个伪静态规则
[打印本页]
作者:
artyi
时间:
2010-12-30 10:06
标题:
求高手,帮转个伪静态规则
[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
复制代码
IIS的规则想转成apache 求高手,小弟在这里先谢了
作者:
artyi
时间:
2010-12-30 10:12
有高手吗,帮帮忙
作者:
serverpoint
时间:
2010-12-30 10:16
提示:
作者被禁止或删除 内容自动屏蔽
作者:
小夜
时间:
2010-12-30 10:21
MARK一下,上午要开会没时间,下午还没人弄,我帮你弄。
[
本帖最后由 小夜 于 2010-12-30 10:22 编辑
]
作者:
micto
时间:
2010-12-30 10:49
拿去试一下。
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
复制代码
欢迎光临 全球主机交流论坛 (https://lilynana.eu.org/)
Powered by Discuz! X3.4