【发布时间】:2016-11-06 08:39:51
【问题描述】:
刚刚发现我的nginx语法不正确:
location /news { rewrite ^(.*)$ /blog redirect;}
我想将 mysite.com/news 重定向到 mysite.com/blog,但该代码将更多页面重定向到博客。
谁能帮我解释错误并告诉我如何正确重定向?
谢谢
【问题讨论】:
标签: redirect nginx url-rewriting http-status-code-301 ngx-http-rewrite-module