5 messages in ru.sysoev.nginxRe: Another rewrite question http://w...
FromSent OnAttachments
devinApr 13, 2009 1:08 pm 
Kiril AngovApr 13, 2009 3:19 pm 
Kiril AngovApr 13, 2009 3:24 pm 
devinApr 13, 2009 10:16 pm 
devinApr 13, 2009 11:59 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Another rewrite question http://www.domain.com/co/Actions...
From:Kiril Angov (kupo@gmail.com)
Date:Apr 13, 2009 3:19:25 pm
List:ru.sysoev.nginx

Try this:

rewrite ^/([a-zA-Z]+)/$ /index.php?country=$1 break;

On Mon, Apr 13, 2009 at 11:08 PM, devin <ngin@nginx.us> wrote:

I have tried tons of combinations without any luck:

I want to get this rule:

http://www.domain.com/uk/ -> index.php?country=uk

From Apache: RewriteRule ^({2,}/)$ index.php?country=$1 RewriteRule ^({2,})$ index.php?country=$1 RewriteRule ^({2}/)index.php$ index.php?country=$1

I tried in location /:                rewrite "^({2}/)$" index.php?country=$1 break;                rewrite "^/({2}/)$" index.php?country=$1 break;

What I'm missing?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,1026,1026#msg-1026