destoon-nginx模版绑定二级域名的伪静态规则之一
Posted 小丫的小破孩
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了destoon-nginx模版绑定二级域名的伪静态规则之一相关的知识,希望对你有一定的参考价值。
模块绑定二级域名之后,伪静态规则无法生效,模块二级域名信息打开显示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;
}
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模版绑定二级域名的伪静态规则之一的主要内容,如果未能解决你的问题,请参考以下文章
zen-cart模版。安装好模版了。 首页也都修改好了。上传产品也好了 首页也有显示产品了。