返回列表 发新帖
查看: 1984|回复: 1

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

[复制链接]

6671

热度

1万

元宝

262

贡献

管理员

DZ专员

发表于 2015-6-5 10:23:04 | 显示全部楼层 |阅读模式
[维清]插件伪静态Rewrite规则

适用于:
维清微信文章采集器 带插件手机版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(独立主机用户)
  1. <IfModule mod_rewrite.c>
  2.         RewriteEngine On
  3.         RewriteCond %{QUERY_STRING} ^(.*)$
  4.         RewriteRule ^(.*)/list-(\w+)\.html$ $1/plugin.php?id=wq_help&cid=$2&%1
  5.         RewriteCond %{QUERY_STRING} ^(.*)$
  6.         RewriteRule ^(.*)/wechatarticle-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatcollecting&mod=list&classid=$2&displayorder=$3&page=$4&%1
  7.         RewriteCond %{QUERY_STRING} ^(.*)$
  8.         RewriteRule ^(.*)/wechatarticle-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatcollecting&mod=view&articleid=$2&%1
  9.         RewriteCond %{QUERY_STRING} ^(.*)$
  10.         RewriteRule ^(.*)/wechat-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatshow&mod=list&classid=$2&displayorder=$3&page=$4&%1
  11.         RewriteCond %{QUERY_STRING} ^(.*)$
  12.         RewriteRule ^(.*)/wechat-(\w+)-([0-9]+)\.html$ $1/plugin.php?id=wq_wechatshow&mod=view&wid=$2&page=$3&%1
  13. </IfModule>
复制代码



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

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

  5. # Rewrite 系统规则请勿修改
  6. RewriteCond %{QUERY_STRING} ^(.*)$
  7. RewriteRule ^list-(\w+)\.html$ plugin.php?id=wq_help&cid=$1&%1
  8. RewriteCond %{QUERY_STRING} ^(.*)$
  9. RewriteRule ^wechatarticle-([0-9]+)-([0-9]+)-([0-9]+)\.html$ plugin.php?id=wq_wechatcollecting&mod=list&classid=$1&displayorder=$2&page=$3&%1
  10. RewriteCond %{QUERY_STRING} ^(.*)$
  11. RewriteRule ^wechatarticle-([0-9]+)\.html$ plugin.php?id=wq_wechatcollecting&mod=view&articleid=$1&%1
  12. RewriteCond %{QUERY_STRING} ^(.*)$
  13. RewriteRule ^wechat-([0-9]+)-([0-9]+)-([0-9]+)\.html$ plugin.php?id=wq_wechatshow&mod=list&classid=$1&displayorder=$2&page=$3&%1
  14. RewriteCond %{QUERY_STRING} ^(.*)$
  15. RewriteRule ^wechat-(\w+)-([0-9]+)\.html$ plugin.php?id=wq_wechatshow&mod=view&wid=$1&page=$2&%1
复制代码



IIS Web Server(独立主机用户)
  1. [ISAPI_Rewrite]

  2. # 3600 = 1 hour
  3. CacheClockRate 3600

  4. RepeatLimit 32

  5. # Protect httpd.ini and httpd.parse.errors files
  6. # from accessing through HTTP
  7. RewriteRule ^(.*)/list-(\w+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_help&cid=$2&$4
  8. RewriteRule ^(.*)/wechatarticle-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_wechatcollecting&mod=list&classid=$2&displayorder=$3&page=$4&$6
  9. RewriteRule ^(.*)/wechatarticle-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_wechatcollecting&mod=view&articleid=$2&$4
  10. RewriteRule ^(.*)/wechat-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_wechatshow&mod=list&classid=$2&displayorder=$3&page=$4&$6
  11. RewriteRule ^(.*)/wechat-(\w+)-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=wq_wechatshow&mod=view&wid=$2&page=$3&$5
复制代码



IIS7 Web Server(独立主机用户)
  1. <rewrite>
  2.         <rules>
  3.                 <rule name="help_list">
  4.                         <match url="^(.*/)*list-(\w+).html\?*(.*)$" />
  5.                         <action type="Rewrite" url="{R:1}/plugin.php\?id=wq_help&cid={R:2}&{R:3}" />
  6.                 </rule>
  7.                 <rule name="article_list">
  8.                         <match url="^(.*/)*wechatarticle-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
  9.                         <action type="Rewrite" url="{R:1}/plugin.php\?id=wq_wechatcollecting&mod=list&classid={R:2}&displayorder={R:3}&page={R:4}&{R:5}" />
  10.                 </rule>
  11.                 <rule name="article_view">
  12.                         <match url="^(.*/)*wechatarticle-([0-9]+).html\?*(.*)$" />
  13.                         <action type="Rewrite" url="{R:1}/plugin.php\?id=wq_wechatcollecting&mod=view&articleid={R:2}&{R:3}" />
  14.                 </rule>
  15.                 <rule name="wechat_list">
  16.                         <match url="^(.*/)*wechat-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
  17.                         <action type="Rewrite" url="{R:1}/plugin.php\?id=wq_wechatshow&mod=list&classid={R:2}&displayorder={R:3}&page={R:4}&{R:5}" />
  18.                 </rule>
  19.                 <rule name="wechat_view">
  20.                         <match url="^(.*/)*wechat-(\w+)-([0-9]+).html\?*(.*)$" />
  21.                         <action type="Rewrite" url="{R:1}/plugin.php\?id=wq_wechatshow&mod=view&wid={R:2}&page={R:3}&{R:4}" />
  22.                 </rule>
  23.         </rules>
  24. </rewrite>
复制代码



Zeus Web Server

  1. match URL into $ with ^(.*)/list-(\w+)\.html\?*(.*)$
  2. if matched then
  3.         set URL = $1/plugin.php?id=wq_help&cid=$2&$3
  4. endif
  5. match URL into $ with ^(.*)/wechatarticle-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$
  6. if matched then
  7.         set URL = $1/plugin.php?id=wq_wechatcollecting&mod=list&classid=$2&displayorder=$3&page=$4&$5
  8. endif
  9. match URL into $ with ^(.*)/wechatarticle-([0-9]+)\.html\?*(.*)$
  10. if matched then
  11.         set URL = $1/plugin.php?id=wq_wechatcollecting&mod=view&articleid=$2&$3
  12. endif
  13. match URL into $ with ^(.*)/wechat-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$
  14. if matched then
  15.         set URL = $1/plugin.php?id=wq_wechatshow&mod=list&classid=$2&displayorder=$3&page=$4&$5
  16. endif
  17. match URL into $ with ^(.*)/wechat-(\w+)-([0-9]+)\.html\?*(.*)$
  18. if matched then
  19.         set URL = $1/plugin.php?id=wq_wechatshow&mod=view&wid=$2&page=$3&$4
  20. endif
复制代码


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


返回列表 发新帖
 懒得打字嘛,点击右侧快捷回复【最新发布】   【赞助草根吧享更多权益】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

收藏帖子 返回列表 搜索

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

小黑屋|手机版|草根吧