phpcms在nginx下使用rewrite伪静态
location / {if (!-f $request_filename){
rewrite (.*) /index.php;
}
rewrite ^/caipu-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3 last;
rewrite ^/content-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3 last;
rewrite ^/list-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=lists&catid=$1&page=$2 last;
rewrite ^/tag-([^.]*)-([0-9]+)-([0-9]+).html /index.php?m=content&c=tag&catid=$2&tag=$1&page=$3 last;
rewrite ^/comment-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=comment&c=index&a=init&commentid=content_$1-$2-$3 last;
rewrite ^/([^.]*).html /index.php?m=member&c=index&a=$1 last;
}
以上是青锋建站给大家分享的phpcms在nginx下如何使用rewrite伪静态。青锋建站,提供专业的高品质网站制作服务,包括phpcms网站建设服务,SEO,网络营销,PHP开发,网站建设知名品牌,全国接单,专业做优化型网站,为企业构建营销平台。
转载请注明来源网址:青锋建站-http://www.sjzphp.com/kaifazhe/phpcms/rewrite_1584.html