DZ X伪静态规则
[b]apache web server(独立主机用户)[/b]<ifmodule mod_rewrite.c>
rewriteengine on
rewriterule ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2
rewriterule ^(.*)/article-([0-9]+)\.html$ $1/portal.php?mod=article&articleid=$2
rewriterule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3
rewriterule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page\%3d$4&page=$3
rewriterule ^(.*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3
rewriterule ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3
rewriterule ^(.*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3
</ifmodule>
[b]apache web server(虚拟主机用户)[/b]
# 将 rewriteengine 模式打开
rewriteengine on
# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
rewritebase /discuz
# rewrite 系统规则请勿修改
rewriterule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1
rewriterule ^article-([0-9]+)\.html$ portal.php?mod=article&articleid=$1
rewriterule ^forum-([0-9]+)-([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
[b]iis web server(独立主机用户)
[/b]
[isapi_rewrite]
# 3600 = 1 hour
cacheclockrate 3600
repeatlimit 32
# protect httpd.ini and httpd.parse.errors files
# from accessing through http
rewriterule ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
rewriterule ^(.*)/article-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=article&articleid=$2&$3
rewriterule ^(.*)/forum-([0-9]+)-([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
[b]zeus web server[/b]
match url into $ with ^(.*)/topic-(.+)\.html\?*(.*)$
if matched then
set url = $1/portal.php?mod=topic&topic=$2&$3
endif
match url into $ with ^(.*)/article-([0-9]+)\.html\?*(.*)$
if matched then
set url = $1/portal.php?mod=article&articleid=$2&$3
endif
match url into $ with ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$
if matched then
set url = $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4
endif
match url into $ with ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$
if matched then
set url = $1/forum.php?mod=viewthread&tid=$2&extra=page\%3d$4&page=$3&$5
endif
match url into $ with ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$
if matched then
set url = $1/forum.php?mod=group&fid=$2&page=$3&$4
endif
match url into $ with ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$
if matched then
set url = $1/home.php?mod=space&$2=$3&$4
endif
match url into $ with ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$
if matched then
set url = $1/$2.php?rewrite=$3&$4
endif
[b]nginx web server
[/b]
rewrite ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
rewrite ^(.*)/article-([0-9]+)\.html$ $1/portal.php?mod=article&articleid=$2 last;
rewrite ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3d$4&page=$3 last;
rewrite ^(.*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
rewrite ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
rewrite ^(.*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last; 我轻轻的来又轻轻的走了 谢谢您的辛苦发帖 祝楼主快乐,大家一齐讨论! 此帖必火! 我也想听大家的建议!谢
页:
[1]