Rewrite Help please

Hello,

How can I redirect

http://www.mydomain.com/content/view/
http://www.mydomain.com/content/view/27840/2/ 27840/2/

into

http://new.mydomain.com/ http://new.mydomain.com/27840 27840

Thank’s before

On Wed, Dec 2, 2009 at 1:21 PM, Glen L. [email protected]
wrote:

into

http://new.mydomain.com/27840

rewrite ^/view/content/(\d+)/.* /$1;


O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

I tried this, but it doesn’t work :frowning:

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

Regards,

Glen L.

This config also doesn’t work :frowning:

Edho P Arief ha scritto:

On Wed, Dec 2, 2009 at 1:21 PM, Glen L. [email protected] 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

Thank’s Igor!! I don’t see is carefully…

On Wed, Dec 02, 2009 at 03:32:51PM +0700, Glen L. wrote:

This config also doesn’t work :frowning:

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

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


nginx mailing list
[email protected]
http://nginx.org/mailman/listinfo/nginx


Igor S.
http://sysoev.ru/en/