快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

nginx下网站伪静态rewrite设置规则

用Nginx的朋友可以参考,加到nginx.conf相应主机server段配置中即可!

代码如下:
location / {
###以下为PHPCMS 伪静态化rewrite规则
rewrite ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?itemid=$2&page=$3;
rewrite ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$2&page=$3;
rewrite ^(.*)show-([0-9]+)\.html$ $1/show.php?specialid=$2;
####以下为PHPWind 伪静态化rewrite规则
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last;
}

顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论