.htaccess nginx重写URL不工作
我有一些重写.htaccess中的URL,它们在nginx上不再工作了。都是404 .htaccess网址:.htaccess nginx重写URL不工作,.htaccess,nginx,url-rewriting,.htaccess,Nginx,Url Rewriting,我有一些重写.htaccess中的URL,它们在nginx上不再工作了。都是404 .htaccess网址: RewriteRule ^password/reset?$ index.php?a=password&b=reset [L] RewriteRule ^email/verification/(.*)?$ index.php?a=email&b=verification&hash=$1 [L] nginx重写url rewrite ^/password/reset
RewriteRule ^password/reset?$ index.php?a=password&b=reset [L]
RewriteRule ^email/verification/(.*)?$ index.php?a=email&b=verification&hash=$1 [L]
nginx重写url
rewrite ^/password/reset?$ index.php?a=password&b=reset break;
rewrite ^/email/verification/(.*)?$ index.php?a=email&b=verification&hash=$1 break;
尝试使用
/index.php
(带一个前导的/
)和最后一个,而不是中断/index.php。为什么我应该使用“last”而不是“break”我真的不知道区别在哪里,这取决于rewrite
语句的位置,但是如果您的.php
文件在另一个位置
块中处理,last
将导致nginx
搜索位置
块,然而,中断
不会。