我目前正在将我的博客从 Wordpress 切换到 Ghost。ghost前面有nginx。迁移后,我认识到旧网址
http://domain.org/2015/10/some-topic
像迁移一样
http://domain.org/some-topic
所以日期已经过去了。无论如何,有一些反向链接我不想松动,但我对 nginx 不太熟悉......那么从旧 url 样式重定向到新的最佳方式是什么?
我当前的配置如下:
server {
listen 80;
server_name domain.org;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://10.240.0.2:2368;
proxy_redirect off;
}
}
应该加什么?。我想我需要新的位置,但它应该是什么样子?