Permanent redirection with regex after moving blog
miles
nginx-forum at nginx.us
Thu Aug 13 00:42:33 MSD 2009
I have moved my blog from /weblog to /blog. How can I redirect
all requests for /weblog and its files to /blog?
I have tried:
location /weblog/ { rewrite ^ /blog/ permanent; }
but that pushes all /weblog/ requests to the /blog/ index page,
including /weblog/foo, /weblog/bar.html, etc.
I have tried a number of regex expressions, but so far none
has worked as expected. Could someone please help shed
some light on this?
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,4895,4895#msg-4895
More information about the nginx
mailing list