Permanent redirection with regex after moving blog

miles nginx-forum at nginx.us
Thu Aug 13 01:07:09 MSD 2009


location /weblog/ { rewrite ^/(.*)$ /blog/$1 permanent; }

Thanks, meto! I had tried that as well (sorry for not posting all of
the regular expressions I tried - I lost track of them all), but it has
the same effect; i.e., everything still redirects to the /blog index
page, even links like /weblog/foo.html, /weblog/bar/, etc.

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






More information about the nginx mailing list