Welcome! Log In Create A New Profile

Advanced

Re: Permanent redirection with regex after moving blog

August 13, 2009 03:10AM
On Wed, Aug 12, 2009 at 05:33:25PM -0400, miles wrote:

> location ^~ /weblog/ {
> rewrite ^/weblog/(.*) /blog/$1 permanent;
> }
>
> I believe there's also a way to use regex captures in the location.
> I've not used this method yet, but I believe it's something like this:
>
> location ~ ^/weblog/(.*) {
> rewrite ^ /blog/$1 permanent;
> }
>
> Both solutions appear to work perfectly!
> Thanks so much, Nick!

You should use the first method.


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

Permanent redirection with regex after moving blog

miles August 12, 2009 04:42PM

Re: Permanent redirection with regex after moving blog

meto August 12, 2009 05:00PM

Re: Permanent redirection with regex after moving blog

miles August 12, 2009 05:07PM

Re: Permanent redirection with regex after moving blog

meto August 12, 2009 05:09PM

Re: Permanent redirection with regex after moving blog

miles August 12, 2009 05:17PM

Re: Permanent redirection with regex after moving blog

Igor Sysoev August 13, 2009 03:12AM

Re: Permanent redirection with regex after moving blog

miles August 13, 2009 03:55AM

Re: Permanent redirection with regex after moving blog

Nick Pearson August 12, 2009 05:07PM

Re: Permanent redirection with regex after moving blog

miles August 12, 2009 05:33PM

Re: Permanent redirection with regex after moving blog

Igor Sysoev August 13, 2009 03:10AM

Re: Permanent redirection with regex after moving blog

miles August 13, 2009 03:54AM

Re: Permanent redirection with regex after moving blog

Marcus Clyne August 13, 2009 05:43AM

Re: Permanent redirection with regex after moving blog

Igor Sysoev August 13, 2009 06:20AM

Re: Permanent redirection with regex after moving blog

Marcus Clyne August 13, 2009 09:05AM

Re: Permanent redirection with regex after moving blog

Igor Sysoev August 13, 2009 09:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 323
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready