Another rewrite question http://www.domain.com/co/

devin nginx-forum at nginx.us
Tue Apr 14 00:08:41 MSD 2009


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






More information about the nginx mailing list