Permanent redirection with regex after moving blog
Marcus Clyne
maccaday at gmail.com
Thu Aug 13 13:43:14 MSD 2009
miles wrote:
> 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
>
>
Would
location /weblog/ {
rewrite ^/weblog/(.*) /blog/$1 permanent;
}
not be a little more efficient?
Cheers,
Marcus.
More information about the nginx
mailing list