Welcome! Log In Create A New Profile

Advanced

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

Kiril Angov
April 13, 2009 06:24PM
The forum ate some of your rules, here is the right one (I think):

rewrite ^/([a-z]{2})/?$ /index.php?country=$1 break;

Basically, do no use quotes.

On Tue, Apr 14, 2009 at 1:19 AM, Kiril Angov <kupokomapa@gmail.com> wrote:
> Try this:
>
> rewrite  ^/([a-zA-Z]+)/$  /index.php?country=$1 break;
>
> On Mon, Apr 13, 2009 at 11:08 PM, devin <nginx-forum@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
>>
>>
>>
>
Subject Author Posted

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

devin April 13, 2009 04:08PM

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

Kiril Angov April 13, 2009 06:19PM

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

Kiril Angov April 13, 2009 06:24PM

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

devin April 14, 2009 01:16AM

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

devin April 14, 2009 02:59AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready