How can I rewrite an url with GET parameters?

Hello,

How can I have this : http://example.org/en/somepage.php

For : http://example.org/somepage.php?locale=en

( locale=en is always present)

Thanks.

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

On Wednesday 26 March 2014 12:09:27 skyice wrote:

Hello,

How can I have this : http://example.org/en/somepage.php

For : http://example.org/somepage.php?locale=en

( locale=en is always present)

Thanks.

location =/somepage.php {
rewrite ^ /$arg_locale/somepage.php? last;
}

wbr, Valentin V. Bartenev

Ok thanks but somepage.php is just an examplle and I want this for all
pages
of my website :confused:

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs