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 吗?
RewriteRule ^([^/]*)/([^/]*)/?$ index.php?a=$1&b=$2 [L,NC]
当然,试试这个:
location / { if ( $request_uri ~ ^/(.*)/(.*)/ ) { rewrite ^ /index.php?a=$1&b=$2&$args last; } }
另请阅读有关 nginx-rewrite 模块的文档