在使用nginx配置rewrite中经常会遇到有的地方用last并不能工作,换成break就可以,其中的原理是对于根目录的理解有所区别,按我的测试结果大致是这样的。 location/{proxy_passhttp://test;alias/home/html/;root/home/html;rewrite"^/a/(.).html$"/1.htmllast;} 在location/{配置里:1、使用root指定源:使用last和break都可以2、使用proxy_pass指定源:使用last和break都可以3、使用alias指定源:必须使用last在location/a/或使用...

  8vHGcWwfCJ5b   2023年11月12日   25   0   0 html页面nginxhtmlhtmlhtml页面nginx
关注 更多

空空如也 ~ ~

粉丝 更多

空空如也 ~ ~