Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为 nginx 编写重写规则,但不断出现循环问题如何编写正则表达式以仅匹配?page=home但停在?page=m-home
?page=home
?page=m-home
这是我现在拥有的,但实际上并没有用
if ($args ~ page=[^m\-](.+)){ set $a $1; rewrite ^(.+)$ /cms/index.php?page=m-$a permanent; }