Permanent redirection with regex after moving blog

miles nginx-forum at nginx.us
Thu Aug 13 11:55:15 MSD 2009


All these location like

location /docs.html { rewrite /docs.html /docs/ permanent; }
location /quotes.html { rewrite /quotes.html /docs/quotes.html permanent; }

it's better to change to

location = /docs.html { rewrite ^ /docs/ permanent; }
location = /quotes.html { rewrite ^ /docs/quotes.html permanent; }

Done - thanks so much for pointing that out, Igor!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,4895,4913#msg-4913






More information about the nginx mailing list