Permanent redirection with regex after moving blog

miles nginx-forum at nginx.us
Thu Aug 13 11:54:08 MSD 2009


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

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

You should use the first method.

Thanks so much, Igor - will do!

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






More information about the nginx mailing list