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;

CheapWindowsVPS$4.5/月,美国VPS/免费Windows系统/1Gbps不限流量/,可选美洲、欧洲、亚洲等8大机房

国外商家提供Windows系统的并不常见,CheapWindowsVPS 此次提供的 2 款 VPS 促销套餐,提供 5 折永久优惠码,优惠后月付 4.5 美元起,价格还是挺诱人的,VPS 不限流量,接入 1Gbps 带宽,8 个机房皆可选,其中洛杉矶机房还提供亚洲优化网络供选择,操作系统有 Windows 10 专业版、2012 R2、2016、Linux等。Cheap Windows VPS是...

IonSwitch:$1.75/月KVM-1GB/10G SSD/1TB/爱达荷州

IonSwitch是一家2016年成立的国外VPS主机商,部落上一次分享的信息还停留在2019年,主机商提供基于KVM架构的VPS产品,数据中心之前在美国西雅图,目前是美国爱达荷州科德阿伦(美国西北部,西接华盛顿州和俄勒冈州),为新建的自营数据中心。商家针对新数据中心运行及4号独立日提供了一个5折优惠码,优惠后最低1GB内存套餐每月仅1.75美元起。下面列出部分套餐配置信息。CPU:1core内存...

随风云-内蒙古三线BGP 2-2 5M 25/月 ,香港CN2 25/月 ,美国CERA 25/月 所有云服务器均支持5天无理由退款

公司成立于2021年,专注为用户提供低价高性能云计算产品,致力于云计算应用的易用性开发,面向全球客户提供基于云计算的IT解决方案与客户服务,拥有丰富的国内BGP、三线高防、香港等优质的IDC资源。公司一直秉承”以人为本、客户为尊、永续创新”的价值观,坚持”以微笑收获友善, 以尊重收获理解,以责任收获支持,以谦卑收获成长”的行为观向客户提供全面优质的互...

discuz 伪静态为你推荐
深圳公交车路线深圳公交线路真正免费的网络电话谁有真正免费的网络电话??ghostxp3目前最好的ghost xp3是什么?吴晓波频道买粉五大知识付费平台有哪些?ps抠图技巧如何使用PS抠图童之磊华硕的四核平板电脑,怎么样?qq空间装扮QQ空间装扮godaddy美国GODADDY 域名支持域名别名解析吗?xv播放器下载除了迅雷看看播放器还有什么播放器支持xv格式的视频?xv播放器下载xv播放器怎么下载?
联通vps net主机 dreamhost 56折 宕机监控 免费名片模板 商家促销 129邮箱 什么是服务器托管 阿里云邮箱登陆 免费网络空间 汤博乐 机柜尺寸 此网页包含的内容将不使用安全的https 跟踪路由 主机配置 视频监控服务器 dell服务器论坛 qq空间排行榜 杭州车牌申请网站 更多