Nginx Rewrite Questions

okay, well here’s the prob: I have a current site at domain.tld that
site is now redirecting to forums.domain.tld; the rails app is planned
to reside on domain.tld but all old urls domain.tld/forumdisplay.php?
=5 for e.g need to be translated to forums.domain.tld/forumdisplay.php?
=5 (so all old urls need to forward to forums.domain)

I could essentially match anything with .php in it and have it
redirect to forums.domain.com/match no?

Can anyone help with this?

On 9.1.2008, at 10.37, BigFisch wrote:

Can anyone help with this?

http://wiki.codemongers.com/NginxHttpRewriteModule

Something like this might work (untested):

rewrite ^(/forumdisplay.php.*)$ http://forums.domain.tld$1 last;

//jarkko


Jarkko L.

http://www.railsecommerce.com
http://odesign.fi

Asa Wilson wrote:

Or for all php (also untested):

rewrite ^/(.php)$ http://forums.domain.tld/$1 redirect;

Should be more like: ^/(.php.*)$

Or for all php (also untested):

rewrite ^/(.php)$ http://forums.domain.tld/$1 redirect;