bestjoe 发表于 2016-12-25 09:53:03

nginx伪静态化rewrite规则

用Nginx的朋友可以参考,加到nginx.conf相应主机server段配置中即可!
复制内容到剪贴板
代码:

location / {

###以下为PHPCMS 伪静态化rewrite规则
rewrite ^(.*)show-(+)-(+)\.html$ $1/show.php?itemid=$2&page=$3;
rewrite ^(.*)list-(+)-(+)\.html$ $1/list.php?catid=$2&page=$3;
rewrite ^(.*)show-(+)\.html$ $1/show.php?specialid=$2;


####以下为PHPWind 伪静态化rewrite规则
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
rewrite ^(.*)/simple/(+\.html)$ $1/simple/index.php?$2 last;
页: [1]
查看完整版本: nginx伪静态化rewrite规则