服务器 
首页 > 服务器 > 浏览文章

nginx 伪静态化rewrite规则

(编辑:jimmy 日期: 2024/5/10 浏览:3 次 )
复制代码 代码如下:
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;
}

本文出自 “linux进阶屋” 博客
上一篇:IIS 配置过程及解决方案 学习小结
下一篇:Apache 支持CGI程序和SSI程序的设置方法
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网