码迷,mamicode.com
首页 > 其他好文 > 详细

destoon-nginx模版绑定二级域名的伪静态规则之一

时间:2018-12-10 11:36:23      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:des   显示   nginx   list   一个   ast   建立   dex   oca   

模块绑定二级域名之后,伪静态规则无法生效,模块二级域名信息打开显示404

可以单独建立一个conf文件,然后在二级域名的配置文件中引用

规则如下

 

location / {
            rewrite ^(.*)/file/(.*)\.php(.*)$ /404.php last;
            rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
            rewrite ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show.php?itemid=$2&page=$4 last;
            rewrite ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list.php?catid=$2&page=$4 last;
            rewrite ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show.php?itemid=$2&page=$3 last;
            rewrite ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3 last;
            rewrite ^(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$3&page=$4 last;
            rewrite ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3 last;
            rewrite ^(com)/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$ index.php?homepage=$2&file=$3&rewrite=$4 last;
            rewrite ^(com)/([a-z0-9_\-]+)/([a-z]+)([/])?$ index.php?homepage=$2&file=$3 last;
            rewrite ^(com)/([a-z0-9_\-]+)([/])?$ index.php?homepage=$2 last;
        }

destoon-nginx模版绑定二级域名的伪静态规则之一

标签:des   显示   nginx   list   一个   ast   建立   dex   oca   

原文地址:https://www.cnblogs.com/lx0715/p/9984435.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!