nginx rewrite正则匹配()匹配子组最多匹配到$9,就是从$0到$9 当需要匹配更多子组时,可通过变量来实现 if ($uri ~ ^/forum-15/sortid-74/(.*?)(lastpost|dateline)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$){ set $orderby $2; set $mdate $3; set $workhours $4; set $pricerange $5; se
转自:http://blog.sina.com.cn/s/blog_4f9fc6e10102ux0w.html http://blog.cafeneko.info/2010/10/nginx_rewrite_note/ 或者 http://yuanhsh.iteye.com/blog/1321982 nginx 的官方注释是这样的: last stops processing the current set of ngx_http_rewrite_module directives follow