Rewrite Help please..

Glen Lumanau glen at lumanau.web.id
Wed Dec 2 11:32:51 MSK 2009


This config also doesn't work :(

-----Original Message-----
From: Daniele Melosi [mailto:ml at melosi.it] 
Sent: 02 Desember 2009 15:25
To: nginx at nginx.org
Subject: Re: Rewrite Help please..

Edho P Arief ha scritto:
> On Wed, Dec 2, 2009 at 1:21 PM, Glen Lumanau <glen at lumanau.web.id> wrote:
>> How can I redirect
>> http://www.mydomain.com/content/view/27840/2/
>> into
>> http://new.mydomain.com/27840
> rewrite ^/view/content/(\d+)/.* /$1;

location ^~ /view/content/ {
   rewrite ^/view/content/(\d+)/.* http://new.mydomain.com/$1;
}

 > Sorry, the new page is located at http://new.mydomain.com/node/27840

location ^~ /view/content/ {
   rewrite ^/view/content/(\d+)/.* http://new.mydomain.com/node/$1;
}

Bye
Daniele

_______________________________________________
nginx mailing list
nginx at nginx.org
http://nginx.org/mailman/listinfo/nginx





More information about the nginx mailing list