【发布时间】:2011-05-17 22:46:17
【问题描述】:
我正在尝试将以下 .htaccess 重写规则转换为适当的 NGINX 格式。
# Redirect /signup/PLANNAME or /signup/PLANNAME/ --> /signup/index.php?account_type=PLANNAME
RewriteEngine on
RewriteRule ^signup/([A-Za-z]+)/?$ /signup/index.php?account_type=$1 [NC,L]
我尝试使用以下 NGINX 规则,但它不起作用。
rewrite ^signup/([A-Za-z]+)/?$ /signup/index.php?account_type=$1 last;
知道我做错了什么来使这项工作与 NGINX 一起工作吗?查看official documentation 并不是很有帮助,因为文档不是很完整。
【问题讨论】:
标签: apache .htaccess mod-rewrite nginx