CMS 伪静态顺序冲突解决方案
大家好,这里是关于[常见网站CMS程序伪静态规则(nginx)],[CMS 伪静态顺序冲突解决方案]问题的解答,希望对您有所帮助。如果你还想了解更多这方面的信息,请关注本站其他相关内容,共同学习吧!
文章目录
- 1 常见网站CMS程序伪静态规则(nginx)
- 1.1 EmpireCMS
- 1.2 Xiunuo BBS
- 1.3 dabr
- 1.4 dbshop
- 1.5 dedecms
- 1.6 discuz
- 1.7 discuzx
- 1.8 discuzx2
- 1.9 discuzx3
- 1.10 drupal
- 1.11 ecshop
- 1.12 emlog
- 1.13 laravel5
- 1.14 maccms
- 1.15 mvc
- 1.16 niushop
- 1.17 phpcms
- 1.18 phpwind
- 1.19 sablog
- 1.20 seacms
- 1.21 shopex
- 1.22 thinkphp
- 1.23 typecho
- 1.24 typecho2
- 1.25 weengine
- 1.26 wordpress
- 1.27 wp2
- 1.28 zblog
- 2 CMS 伪静态顺序冲突解决方案
常见网站CMS程序伪静态规则(nginx)
教程大全伪静态规则,网站伪静态规则
常见网站CMS程序伪静态规则(nginx)
下方为常用网站程序的伪静态规则,有新的规则可以在下方留言,我来补充上。
EmpireCMS
rewrite ^([^\\.]*)/listinfo-(.+?)-(.+?)\\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;
rewrite ^([^\\.]*)/showinfo-(.+?)-(.+?)-(.+?)\\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;
rewrite ^([^\\.]*)/infotype-(.+?)-(.+?)\\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;
rewrite ^([^\\.]*)/tags-(.+?)-(.+?)\\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;
rewrite ^([^\\.]*)/comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\\.html$ $1/e/pl/index\\.php\\?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7 last;
if (!-e $request_filename) {
return 404;
}
Xiunuo BBS
rewrite ^/(.*?)([^/]*)\\.htm(.*)$ /$1/index.php?$2.htm$3 last;
dabr
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
}
dbshop
location /{
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \\.htaccess{
deny all;
}
dedecms
location / {
rewrite “^/list-([0-9]+)\\.html$" /plus/list.php?tid=$1 last;
rewrite “^/list-([0-9]+)-([0-9]+)-([0-9]+)\\.html$" /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last;
rewrite “^/view-([0-9]+)-1\\.html$" /plus/view.php?arcID=$1 last;
rewrite “^/view-([0-9]+)-([0-9]+)\\.html$" /plus/view.php?aid=$1&pageno=$2 last;
rewrite “^/tags.html$" /tags.php last;
rewrite “^/tag-([0-9]+)-([0-9]+)\\.html$" /tags.php?/$1/$2/ last;
break;
}
discuz
location / {
rewrite ^/archiver/((fid|tid)-[\\w\\-]+\\.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+)\\.html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+)\\.html$ /space.php?$1=$2 last;
rewrite ^/tag-(.+)\\.html$ /tag.php?name=$1 last;
}
discuzx
discuzx2
discuzx3
drupal
rewrite ^/(.*)$ /index.php?q=$1 last;
}
ecshop
{
rewrite “^/index\\.html" /index.php last;
rewrite “^/category$" /index.php last;
rewrite “^/feed-c([0-9]+)\\.xml$" /feed.php?cat=$1 last;
rewrite “^/feed-b([0-9]+)\\.xml$" /feed.php?brand=$1 last;
rewrite “^/feed\\.xml$" /feed.php last;
rewrite “^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
rewrite “^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last;
rewrite “^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$" /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last;
rewrite “^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\\.html$" /category.php?id=$1&brand=$2&page=$3 last;
rewrite “^/category-([0-9]+)-b([0-9]+)(.*)\\.html$" /category.php?id=$1&brand=$2 last;
rewrite “^/category-([0-9]+)(.*)\\.html$" /category.php?id=$1 last;
rewrite “^/goods-([0-9]+)(.*)\\.html" /goods.php?id=$1 last;
rewrite “^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$" /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;
rewrite “^/article_cat-([0-9]+)-([0-9]+)(.*)\\.html$" /article_cat.php?id=$1&page=$2 last;
rewrite “^/article_cat-([0-9]+)(.*)\\.html$" /article_cat.php?id=$1 last;
rewrite “^/article-([0-9]+)(.*)\\.html$" /article.php?id=$1 last;
rewrite “^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\\.html" /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last;
rewrite “^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\\.html" /brand.php?id=$1&cat=$2&page=$3 last;
rewrite “^/brand-([0-9]+)-c([0-9]+)(.*)\\.html" /brand.php?id=$1&cat=$2 last;
rewrite “^/brand-([0-9]+)(.*)\\.html" /brand.php?id=$1 last;
rewrite “^/tag-(.*)\\.html" /search.php?keywords=$1 last;
rewrite “^/snatch-([0-9]+)\\.html$" /snatch.php?id=$1 last;
rewrite “^/group_buy-([0-9]+)\\.html$" /group_buy.php?act=view&id=$1 last;
rewrite “^/auction-([0-9]+)\\.html$" /auction.php?act=view&id=$1 last;
rewrite “^/exchange-id([0-9]+)(.*)\\.html$" /exchange.php?id=$1&act=view last;
rewrite “^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$" /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;
rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\\.html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
rewrite “^/exchange-([0-9]+)-([0-9]+)(.*)\\.html$" /exchange.php?cat_id=$1&page=$2 last;
rewrite “^/exchange-([0-9]+)(.*)\\.html$" /exchange.php?cat_id=$1 last;
}
emlog
laravel5
maccms
mvc
niushop
phpcms
phpwind
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
rewrite ^(.*)/simple/([a-z0-9\\_]+\\.html)$ $1/simple/index.php?$2 last;
}
sablog
seacms
shopex
if (!-e $request_filename) {
rewrite ^/(.+\\.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last;
}
}
thinkphp
typecho
rewrite ^(.*)$ /index.php$1 last;
}
typecho2
if (!-e $request_filename) {
rewrite ^(.*)$ /typecho/index.php$1 last;
}
}
weengine
proxy_ignore_client_abort on;
rewrite ^/(data|attachment)/.+\\.php$ /404.html last;
location ~ \\.htaccess$ {
deny all;
}
wordpress
wp2
zblog
CMS 伪静态顺序冲突解决方案
伪静态顺序冲突是指几组规则指向错乱,比如栏目页的规则指向了内容页,内容规则指向了栏目页等情况。
如何正确的调试规则:
伪静态解析规则必须像上图的操作,每次测试只能一条规则进行测试,开发者可以反复看下上图的操作流程。
依次上图的操作,把每个规则都测试一下,如果所有的规则都能正常访问了,这时候我们再将所需要的规则进行汇总组合。
汇总组合的时候需要观察每个规则是否出现顺序冲突(对于会正则表达式的开发者来说不算难事,这些都是正则表达式规则)。
1. 带 [亲测] 说明源码已经被站长亲测过!
2. 下载后的源码请在24小时内删除,仅供学习用途!
3. 分享目的仅供大家学习和交流,请不要用于商业用途!
4. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
5. 本站所有资源来源于站长上传和网络,如有侵权请邮件联系站长!
6. 没带 [亲测] 代表站长时间紧促,站长会保持每天更新 [亲测] 源码 !
7. 盗版ripro用户购买ripro美化无担保,若设置不成功/不生效我们不支持退款!
8. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
9. 如果你也有好源码或者教程,可以到审核区发布,分享有金币奖励和额外收入!
10.如果您购买了某个产品,而我们还没来得及更新,请联系站长或留言催更,谢谢理解 !
GG资源网 » CMS 伪静态顺序冲突解决方案