2核1G3M服务器88一季度

腾讯云,阿里云百度云等 折扣价→点我←

[维清]插件伪静态Rewrite规则 discuz 教程

公共账号 管理员组

[维清]插件伪静态Rewrite规则

[backcolor=rgb(255, 0, 255)]适用于:[/backcolor]
维清微信文章采集器 带插件手机版1.0 DZ建站学习研究分享(以最新版发布为准)
http://bbs.zhanzhangwo.com/thread-13410-1-1.html
(出处: 站长窝)

[维清]微信导航 DZ建站学习研究分享(以最新版发布为准)
http://bbs.zhanzhangwo.com/thread-13418-1-1.html
(出处: 站长窝)

[维清]微信导航 DZ建站学习研究分享(以最新版发布为准)
http://bbs.zhanzhangwo.com/thread-13418-1-1.html
(出处: 站长窝)

Apache Web Server(独立主机用户)
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{QUERY_STRING} ^(.*)$
	RewriteRule ^(.*)/list-(\w+)\.html$ $1/plugin.php?id=wq_help&cid=$2&%1
	RewriteCond %{QUERY_STRING} ^(.*)$
	RewriteRule ^(.*)/wechatarticle-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatcollecting&mod=list&classid=$2&displayorder=$3&page=$4&%1
	RewriteCond %{QUERY_STRING} ^(.*)$
	RewriteRule ^(.*)/wechatarticle-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatcollecting&mod=view&articleid=$2&%1
	RewriteCond %{QUERY_STRING} ^(.*)$
	RewriteRule ^(.*)/wechat-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatshow&mod=list&classid=$2&displayorder=$3&page=$4&%1
	RewriteCond %{QUERY_STRING} ^(.*)$
	RewriteRule ^(.*)/wechat-(\w+)-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatshow&mod=view&wid=$2&page=$3&%1
</IfModule>



Apache Web Server(虚拟主机用户)
# 将 RewriteEngine 模式打开
RewriteEngine On

# 修改以下语句中的 /discuz 为您的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
RewriteBase /discuz

# Rewrite 系统规则请勿修改
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^list-(\w+)\.html$ plugin.php?id=wq_help&cid=$1&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^wechatarticle-([0-9]+)-([0-9]+)-([0-9]+)\.html$ plugin.php?id=wq_wechatcollecting&mod=list&classid=$1&displayorder=$2&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^wechatarticle-([0-9]+)\.html$ plugin.php?id=wq_wechatcollecting&mod=view&articleid=$1&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^wechat-([0-9]+)-([0-9]+)-([0-9]+)\.html$ plugin.php?id=wq_wechatshow&mod=list&classid=$1&displayorder=$2&page=$3&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^wechat-(\w+)-([0-9]+)\.html$ plugin.php?id=wq_wechatshow&mod=view&wid=$1&page=$2&%1



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 ^(.*)/list-(\w+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_help&cid=$2&$4
RewriteRule ^(.*)/wechatarticle-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_wechatcollecting&mod=list&classid=$2&displayorder=$3&page=$4&$6
RewriteRule ^(.*)/wechatarticle-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_wechatcollecting&mod=view&articleid=$2&$4
RewriteRule ^(.*)/wechat-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_wechatshow&mod=list&classid=$2&displayorder=$3&page=$4&$6
RewriteRule ^(.*)/wechat-(\w+)-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_wechatshow&mod=view&wid=$2&page=$3&$5



IIS7 Web Server(独立主机用户)
<rewrite>
	<rules>
		<rule name="help_list">
			<match url="^(.*/)*list-(\w+).html\?*(.*)$" />
			<action type="Rewrite" url="{R:1}/plugin.php\?id=wq_help&cid={R:2}&{R:3}" />
		</rule>
		<rule name="article_list">
			<match url="^(.*/)*wechatarticle-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
			<action type="Rewrite" url="{R:1}/plugin.php\?id=wq_wechatcollecting&mod=list&classid={R:2}&displayorder={R:3}&page={R:4}&{R:5}" />
		</rule>
		<rule name="article_view">
			<match url="^(.*/)*wechatarticle-([0-9]+).html\?*(.*)$" />
			<action type="Rewrite" url="{R:1}/plugin.php\?id=wq_wechatcollecting&mod=view&articleid={R:2}&{R:3}" />
		</rule>
		<rule name="wechat_list">
			<match url="^(.*/)*wechat-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
			<action type="Rewrite" url="{R:1}/plugin.php\?id=wq_wechatshow&mod=list&classid={R:2}&displayorder={R:3}&page={R:4}&{R:5}" />
		</rule>
		<rule name="wechat_view">
			<match url="^(.*/)*wechat-(\w+)-([0-9]+).html\?*(.*)$" />
			<action type="Rewrite" url="{R:1}/plugin.php\?id=wq_wechatshow&mod=view&wid={R:2}&page={R:3}&{R:4}" />
		</rule>
	</rules>
</rewrite>



Zeus Web Server

match URL into $ with ^(.*)/list-(\w+)\.html\?*(.*)$
if matched then
	set URL = $1/plugin.php?id=wq_help&cid=$2&$3
endif
match URL into $ with ^(.*)/wechatarticle-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$
if matched then
	set URL = $1/plugin.php?id=wq_wechatcollecting&mod=list&classid=$2&displayorder=$3&page=$4&$5
endif
match URL into $ with ^(.*)/wechatarticle-([0-9]+)\.html\?*(.*)$
if matched then
	set URL = $1/plugin.php?id=wq_wechatcollecting&mod=view&articleid=$2&$3
endif
match URL into $ with ^(.*)/wechat-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$
if matched then
	set URL = $1/plugin.php?id=wq_wechatshow&mod=list&classid=$2&displayorder=$3&page=$4&$5
endif
match URL into $ with ^(.*)/wechat-(\w+)-([0-9]+)\.html\?*(.*)$
if matched then
	set URL = $1/plugin.php?id=wq_wechatshow&mod=view&wid=$2&page=$3&$4
endif


Nginx Web Server
rewrite ^([^\.]*)/list-(\w+)\.html$ $1/plugin.php?id=wq_help&cid=$2 last;
rewrite ^([^\.]*)/wechatarticle-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatcollecting&mod=list&classid=$2&displayorder=$3&page=$4 last;
rewrite ^([^\.]*)/wechatarticle-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatcollecting&mod=view&articleid=$2 last;
rewrite ^([^\.]*)/wechat-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatshow&mod=list&classid=$2&displayorder=$3&page=$4 last;
rewrite ^([^\.]*)/wechat-(\w+)-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatshow&mod=view&wid=$2&page=$3 last;
if (!-e $request_filename) {
	return 404;
}


站长窝论坛版权声明 1、本帖标题:[维清]插件伪静态Rewrite规则
2、论坛网址:站长窝论坛
3、站长窝论坛的资源部分来源于网络,如有侵权,请联系站长进行删除处理。
4、会员发帖仅代表会员个人观点,并不代表本站赞同其观点和对其真实性负责。
5、站长窝论坛一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6、本帖由公共账号在站长窝论坛《程序综合区》版块原创发布, 转载请注明出处!
评论
最新回复 (1)
返回
发新帖