Rewrite和location 区别

ewritelocation区别:

rewrite是在同一域名内更改资源获取的路径

Location是对路径 做控制访问或反向代理,可以使用proxy_pass到其他主机

很多情况下rewrite会写在location里,

他们的执行顺序:

执行server块的rewrite指令

执行location匹配

执行选定的location中的rewrite指令

 

 

原文地址:https://www.cnblogs.com/liu1584712/p/11573071.html