nginx 上许多 url 的 301 重定向
301 redirect for many urls on nginx
我想在 nginx 服务器上将许多旧的 url 重定向到较新的。
如果我 google 寻求解决方案,我通常会找到复杂的方法,如果我要重定向超过 100 url 秒,这些方法不是很方便。
是否有解决方案可以在每次重定向时在一行中执行此操作 url?
抱歉,太简单了:)
rewrite ^/old-url.php$ http://www.new-url.com/new-url.php permanent;
我想在 nginx 服务器上将许多旧的 url 重定向到较新的。
如果我 google 寻求解决方案,我通常会找到复杂的方法,如果我要重定向超过 100 url 秒,这些方法不是很方便。
是否有解决方案可以在每次重定向时在一行中执行此操作 url?
抱歉,太简单了:)
rewrite ^/old-url.php$ http://www.new-url.com/new-url.php permanent;