view[训练]在不同的Web主机下Discuz! X15 伪静态设置代码规则

discuz 伪静态  时间:2021-02-10  阅读:()

±¾ÎÄÖнéÉÜÁËÔÚApache¡¢IIS¡¢Zeus¡¢Nginx ¼¸ÖÖ³£ÓõÄWebÖ÷»úÏÂDiscuz! X1.5α¾²Ì¬ÉèÖ÷½·¨´úÂë¡£

1¡¢Apache Web Server(¶ÀÁ¢Ö÷»úÓû§)

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule ^ ( .*)/topic-( .+) \.html$ $1/portal.php?mod=topic&topic=$2&%1

RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule

^( . *)/article-( [0-9]+)- ( [0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3&%1RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule

^( . *)/forum-(\w+)- ( [0-9]+)\.html$ $1/f orum.php?mod=f orumdisplay&f id=$2&page=$3&%

1

RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule

^( . *)/thread- ( [0-9]+)-( [0-9]+) -( [0-9]+) \ .html$ $1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&%1

RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule

^( . *)/group-( [0-9]+) -( [0-9]+)\ .html$ $1/forum.php?mod=group&fid=$2&page=$3&%1RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule ^( .*)/space-(username|uid) -( .+) \.html$ $1/home.php?mod=space&$2=$3&%1RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule ^ ( .*)/ ( [a-z]+)-( .+)\.html$ $1/$2.php?rewrite=$3&%1

</I fModule>

1.1Apache Web Server(ÐéÄâÖ÷»úÓû§)

# ½« RewriteEngine ģʽ´ò¿ª

RewriteEngine On

#ÐÞ¸ÄÒÔÏÂÓï¾äÖÐµÄ /discuz ΪÄãµÄÂÛ̳Ŀ¼µØÖ·£¬Èç¹û³ÌÐò·ÅÔÚ¸ùĿ¼ÖУ¬Ç뽫 /discuzÐÞ¸ÄΪ /

RewriteBase /discuz

# Rewrite ϵͳ ¹æÔòÇëÎðÐÞ¸Ä

RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule ^topic-( .+) \.html$ portal.php?mod=topic&topic=$1&%1

RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule

^article-( [0-9]+)- ( [0-9]+)\.html$portal.php?mod=view&aid=$1&page=$2&%1

RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule

^forum-(\w+)- ( [0-9]+)\.html$ f orum.php?mod=forumdisplay&f id=$1&page=$2&%1RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule

^thread- ( [0-9]+) -( [0-9]+) -( [0-9]+)\ .html$ f orum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1

RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule ^group-( [0-9]+)- ( [0-9]+) \.html$ forum.php?mod=group&fid=$1&page=$2&%1RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule^space-(username|uid)-( .+)\.html$home.php?mod=space&$1=$2&%1RewriteCond %{QUERY_STRING} ^( .*) $

RewriteRule ^ ( [a-z]+)-( .+)\.html$ $1.php?rewrite=$2&%1

2¡¢IIS Web Server(¶ÀÁ¢Ö÷»úÓû§)

[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&$3RewriteRule

^( . *)/article-( [0-9]+)- ( [0-9]+)\.html\?* ( .*)$ $1/portal\.php\?mod=view&aid=$2&page=$3&$4

RewriteRule

^( . *)/forum-(\w+)- ( [0-9]+)\.html\?* ( .*)$ $1/f orum\ .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/f orum\.php\?mod=group&f id=$2&page=$3&$4

RewriteRule

^( . *)/space-(username|uid)-( .+)\.html\?* ( .*)$ $1/home\ .php\?mod=space&$2=$3&$4RewriteRule ^ ( . *)/ ( [a-z]+)-( .+)\.html\?* ( .*)$ $1/$2\ .php\?rewrite=$3&$4

3¡¢Zeus Web Servermatch URL into $ with ^ ( .*)/topic-( .+) \.html\?*( .*)$if matched thenset URL = $1/portal.php?mod=topic&topic=$2&$3endifmatch URL into $ with ^ ( .*)/article-( [0-9]+)- ( [0-9]+) \.html\?* ( .*)$if matched thenset URL = $1/portal.php?mod=view&aid=$2&page=$3&$4endifmatch URL into $ with ^ ( .*)/forum-(\w+)- ( [0-9]+) \.html\?* ( .*)$if matched thenset URL = $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4endifmatch URL into $with^ ( .*) /thread- ( [0-9]+)-( [0-9]+) -( [0-9]+)\ .html\?* ( . *) $if matched thenset URL=$1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5endifmatch URL into $ with ^ ( .*)/group-( [0-9]+)- ( [0-9]+)\.html\?* ( . *)$if matched thenset URL = $1/forum.php?mod=group&fid=$2&page=$3&$4endifmatch URL into $ with ^ ( .*)/space-(username|uid) -( .+) \.html\?* ( .*)$if matched thenset URL = $1/home.php?mod=space&$2=$3&$4endifmatch URL into $ with ^ ( . *)/ ( [a-z]+)-( .+)\.html\?* ( .*)$if matched thenset URL = $1/$2.php?rewrite=$3&$4endif

4¡¢Nginx Web Serverrewrite ^( [^\ . ]*)/topic-( .+) \.html$ $1/portal.php?mod=topic&topic=$2 last;rewrite

^( [^\. ]*)/article- ( [0-9]+)-( [0-9]+) \.html$ $1/portal.php?mod=view&aid=$2&page=$3

last;rewrite

^( [^\. ]*)/f orum- (\w+)-( [0-9]+) \.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;rewrite

^( [^\. ]*)/thread-( [0-9]+) -( [0-9]+)- ( [0-9]+) \.html$ $1/f orum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;rewrite

^( [^\. ]*)/group- ( [0-9]+)- ( [0-9]+) \.html$ $1/forum.php?mod=group&f id=$2&page=$3last;rewrite ^( [^\. ] *) /space- (username|uid)- ( .+)\ .html$ $1/home.php?mod=space&$2=$3last;rewrite ^( [^\ . ]*)/ ( [a-z]+)-( .+)\.html$ $1/$2.php?rewrite=$3 last;if ( !-e $request_f ilename) {return 404;

阿里云香港 16核32G 20M 999元/月

阿里云香港配置图提速啦是成立于2012年的十分老牌的一个商家这次给大家评测的是 阿里云香港 16核32G 20M 这款产品,单单说价格上就是十分的离谱原价8631元/月的现价只要 999元 而且还有个8折循环优惠。废话不多说直接进入正题。优惠时间 2021年8月20日-2021年9月20日 优惠码 wn789 8折优惠阿里云香港BGP专线 16核32G 10M带宽 优惠购买 399元购买链接阿里云...

Megalayer美国独立服务器配置及性能速度综合评测

Megalayer 商家在之前也有记录过,商家开始只有提供香港站群服务器和独立服务器,后来也有增加到美国独立服务器,以及前几天也有介绍到有增加香港VPS主机。对于香港服务器之前有过评测(Megalayer香港服务器配置一览及E3-1230 8GB服务器评测记录),这里申请到一台美国独立服务器,所以也准备简单的评测记录。目前市场上我们看到很多商家提供VPS或者云服务器基本上没有什么特别的,但是独立服...

香港E3 16G 390元/ 香港E5*2 32G 600元/ 香港站群 4-8C 1200元/ 美国200G高防 900/ 日本100M 700元

3C云国内IDC/ISP资质齐全商家,与香港公司联合运营, 已超6年运营 。本次为大家带来的是双12特惠活动,香港美国日本韩国|高速精品|高防|站群|大带宽等产品齐全,欢迎咨询问价。3C云科技有限公司官方网站:http://www.3cccy.com/客服QQ:937695003网页客服:点击咨询客户QQ交流群:1042709810价目表总览升级内存 60元 8G内存升级硬盘 1T机械 90元 2...

discuz 伪静态为你推荐
无线路由器限速设置无线路由器怎么设置限速天天酷跑刷金币天天酷跑怎么刷金币?开机滚动条如何关闭开机滚动条?免费免费建站最好的免费建站虚拟专用网拨号网络与虚拟专用网的区别gbk编码表gbk内码表怎么看三星s8什么时候上市三星s8什么时候首发服务器连接异常手机服务器连接异常服务器连接异常手机WIFI检查显示主服务器连接异常,怎么办服务器连接异常服务器连接异常,即将退出,请重新进入游戏.怎么回事
申请免费域名 中国域名交易中心 3322动态域名 免费cn域名 荷兰服务器 adman hawkhost优惠码 ix主机 koss ssh帐号 华为网络硬盘 骨干网络 全站静态化 空间论坛 789电视 umax120 如何注册阿里云邮箱 空间首页登陆 空间登陆首页 外贸空间 更多