


















白小二
在
nginx如何兼容伪静态跟id格式的链接
中增加了附言:
location / {
rewrite ^/(\d+)$ /home/show/index?roomnum=$1;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
增加一条重写规则,$1会自动匹配斜杠之间规则,括号代表一个完整的参数,一定能加括号,不然匹配不到参数