来源: (2条消息) php商城伪静态,友价商城nginx伪静态源码规则_weixin_39882394的博客-CSDN博客
不少朋友搭建完友价 T5 源码商城后发现很多页面无法正常打开,其实是伪静态没做好。
在这里我推荐使用宝塔搭建,将下面伪静态规则复制到:网站-管理-伪静态-保存即可
一般网站有自带的apache规则,但是经过转换后无法使用,用下面的规则后便可正常了!如需源码可以联系客服!手上有更好用的源代码!
nginx 伪静态规则:rewrite ^/(.*)/search(.*).html /$1/index.php?str=$2 last;
rewrite ^/(.*)/view([0-9]*).html /$1/view.php?id=$2 last;
rewrite ^/(.*)/(.*)list(.*).html /$1/$2list.php?str=$3 last;
rewrite ^/(.*)/(.*)view(.*).html /$1/$2view.php?id=$3 last;
location ~* ^/((.*)upload|ad|gg|img|ckeditor\/attached|(.*)upload1|(.*)upload2|(.*)upload3)/.*\.(php|php5|asp)$
{
deny all;
}
rewrite ^(?i)/config/ueditor/php/upload/(.*).PHP /css/ last;
rewrite ^(?i)/config/ueditor/php/upload/(.*).asp /css/ last;
rewrite ^(?i)/config/ueditor/php/upload1/(.*).php /css/ last;
rewrite ^(?i)/config/ueditor/php/upload1/(.*).asp /css/ last;
rewrite ^(?i)/config/ueditor/php/upload2/(.*).php /css/ last;
rewrite ^(?i)/config/ueditor/php/upload2/(.*).asp /css/ last;
rewrite ^(?i)/config/ueditor/php/upload3/(.*).php /css/ last;
rewrite ^(?i)/config/ueditor/php/upload3/(.*).asp /css/ last;
rewrite ^(?i)/config/ueditor_mini/php/upload/(.*).php /css/ last;
rewrite ^(?i)/config/ueditor_mini/php/upload/(.*).asp /css/ last;
rewrite ^(?i)/config/ueditor_mini/php/upload1/(.*).php /css/ last;
rewrite ^(?i)/config/ueditor_mini/php/upload1/(.*).asp /css/ last;
rewrite ^(?i)/config/ueditor_mini/php/upload2/(.*).php /css/ last;
rewrite ^(?i)/config/ueditor_mini/php/upload2/(.*).asp /css/ last;
rewrite ^(?i)/config/ueditor_mini/php/upload3/(.*).php /css/ last;
rewrite ^(?i)/config/ueditor_mini/php/upload3/(.*).asp /css/ last;
rewrite ^(?i)/ad/(.*).php /css/ last;
rewrite ^(?i)/ad/(.*).asp /css/ last;
rewrite ^(?i)/gg/(.*).php /css/ last;
rewrite ^(?i)/gg/(.*).asp /css/ last;
rewrite ^(?i)/img/(.*).php /css/ last;
rewrite ^(?i)/img/(.*).asp /css/ last;
rewrite ^(?i)/upload/(.*).php /css/ last;
rewrite ^(?i)/upload/(.*).asp /css/ last;
rewrite ^(?i)/ckeditor/attached/(.*).php /css/ last;
rewrite ^(?i)/ckeditor/attached/(.*).asp /css/ last;