nginx重新规则注意事项

warning: 这篇文章距离上次修改已过1046天,其中的内容可能已经有所变动。

nginx rewrite 重写使用

  • rewrite url 后没达到理想结果,php内容变为直接暂时源码。
  • 排查对比,rewrite old_url new_url last; 在正则location 下不生效

    location ^~ /ext_url {

     rewrite . /new_url.php last; # 不生效,将location 改为普通匹配即可

    }

none
最后修改于:2021年05月17日 23:09

添加新评论