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;

DogYun(300元/月),韩国独立服务器,E5/SSD+NVMe

DogYun(中文名称狗云)新上了一批韩国自动化上架独立服务器,使用月减200元优惠码后仅需每月300元,双E5 CPU,SSD+NVMe高性能硬盘,支持安装Linux或者Windows操作系统,下单自动化上架。这是一家成立于2019年的国人主机商,提供VPS和独立服务器租用等产品,数据中心包括中国香港、美国洛杉矶、日本、韩国、德国、荷兰等。下面分享这款自动化上架韩国独立服务器的配置和优惠码信息。...

Boomer.Host(年付3.5美)休斯敦便宜VPS

Boomer.Host是一家比较新的国外主机商,虽然LEB自述 we’re now more than 2 year old,商家提供虚拟主机和VPS,其中VPS主机基于OpenVZ架构,数据中心为美国得克萨斯州休斯敦。目前,商家在LET发了两款特别促销套餐,年付最低3.5美元起,特别提醒:低价低配,且必须年付,请务必自行斟酌确定需求再入手。下面列出几款促销套餐的配置信息。CPU:1core内存:...

VPS云服务器GT线路,KVM虚vps消息CloudCone美国洛杉矶便宜年付VPS云服务器补货14美元/年

近日CloudCone发布了最新的补货消息,针对此前新年闪购年付便宜VPS云服务器计划方案进行了少量补货,KVM虚拟架构,美国洛杉矶CN2 GT线路,1Gbps带宽,最低3TB流量,仅需14美元/年,有需要国外便宜美国洛杉矶VPS云服务器的朋友可以尝试一下。CloudCone怎么样?CloudCone服务器好不好?CloudCone值不值得购买?CloudCone是一家成立于2017年的美国服务器...

discuz 伪静态为你推荐
安装程序配置服务器失败sql安装程序配置服务器失败spgnuxPC操作系统如何描述申请证书求高手教下怎么申请证书mate8价格现在买华为mate8高配划算吗商标注册查询官网怎么查商标是否注册成功宽带接入服务器什么是宽带接入系统?怎样绕过宽带接入系统上网blogcn南京明城墙(太平门一带某些地区)的城砖上为什么会有一些小洞(每块砖两个洞洞……)?网站推广外链在网站推广中,有着一种“购买外链”是什么意思去鼠标加速度去鼠标加速到底有什么好处.......手工杀毒手工杀毒与杀毒软件杀毒有什么区别?
vps推荐 域名主机管理系统 汉邦高科域名申请 westhost 10t等于多少g 账号泄露 godaddy域名转出 建站代码 panel1 linux空间 lol台服官网 免费cdn 国外视频网站有哪些 万网空间管理 丽萨 镇江高防 中国联通宽带测速 购买空间 测试网速命令 腾讯网盘 更多