解决Destoon模块二级域名下和商铺二级域名使用伪静态规则的问题

分类栏目:destoon实战

76

本教程合适于 nginx 环境

1、模块二级域名下面伪静态规则问题
当某些朋友把模块做了二级域名绑定之后
发现伪静态规则设置的问题:
例如在我的主站是***.com
对供求信息设置了:sell.***.com这个二级域名
想在后台启用伪静态规则: https://sell.***.com/list-1-2.html 这个模式

是不是发现这个https://sell.***.com/list-1-2.html不能成功?

只要伪静态独立设置即可

rewrite ^/list-([0-9]+)([\-])?([0-9]+)?\.html$ /list.php?catid=$1&page=$3; rewrite ^/show-([0-9]+)([\-])?([0-9]+)?\.html$ /show.php?itemid=$1&page=$3;
或者在环境配置文件中加上

location / { rewrite ^/list-([0-9]+)([\-])?([0-9]+)?\.html$ /list.php?catid=$1&page=$3; rewrite ^/show-([0-9]+)([\-])?([0-9]+)?\.html$ /show.php?itemid=$1&page=$3; }

2、商铺二级域名后不支持shtml 也是伪静态规则问题。我们只要在环境配置文件找到*的泛解析配置加上

location / { rewrite ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3 last; }