【发布时间】:2016-12-26 06:48:46
【问题描述】:
如果脚本名称仅包含数字,我该如何重定向?
http://example.com/125689 -> http://example.com/news/125689
我使用了此代码,但出现 404 错误。
location ~ /([0-9]+) {
return 301 http://example.com/news/$1;
}
【问题讨论】:
标签: wordpress nginx nginx-location