小草根

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

作者:小草根   发布时间:2015-06-05 10:23   回复数:1   浏览数:1984
小草根
19841小草根管理员
2015-06-05 10:23:04
19841 2015-06-05 10:23:04
[维清]插件伪静态Rewrite规则

[backcolor=rgb(255, 0, 255)]适用于:
维清微信文章采集器 带插件手机版1.0 DZ建站学习研究分享(以最新版发布为准)
https://www.cgzz8.cn/t-13410-1-1.html
(出处: 草根吧)

[维清]微信导航 DZ建站学习研究分享(以最新版发布为准)
https://www.cgzz8.cn/t-13418-1-1.html
(出处: 草根吧)

[维清]微信导航 DZ建站学习研究分享(以最新版发布为准)
https://www.cgzz8.cn/t-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;
}

游客
登录后才可以回帖,登录 或者 注册