Nginx rewrite伪静态工作记录

rewrite ^/z_([0-9]+)\.html$  /initPingCe.do?topicid=$1                                                     last;
rewrite ^/a_([0-9]+)_([0-9]+)_([0-9]+)\.html$  /answerPingCe.do?topicid=$1&questionorder=$2&answerid=$3    last;
rewrite ^/c_([0-9]+)_([0-9]+)\.html$   /conclusionPingCe.do?topicid=$1&conclusionid=$2                     last;
rewrite ^/v_([0-9]+)_([0-9]+)\.html$   /votePingCe.do?topicid=$1&conclusionid=$2                           last;
rewrite ^/l_([0-9]+)_([0-9]?)\.html$   /pingCeList.do?ttid=$1&page=$2                                      last;
rewrite "^/.*jsessionid.*"   http://ceshi.test.com/                                    last;

 
rewrite 主要就是正则匹配结合业务需求即可。

本文转自pandazhai 51CTO博客,原文链接:http://blog.51cto.com/dreamway/1045587
上一篇:linux多网卡绑定聚合-bond技术


下一篇:使用阿里云服务器+ Nginx 搭建静态资源 web 服务器