Rewrite Help please..

Daniele Melosi ml at melosi.it
Wed Dec 2 11:25:07 MSK 2009


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




More information about the nginx mailing list