Forum: NGINX How can I rewrite an url with GET parameters ?

2974d09ac2541e892966b762aad84943?d=identicon&s=25 skyice (Guest)
on 2014-03-26 17:09
(Received via mailing list)
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
40b4c848b8fcd63b0cb60b9d170c3a77?d=identicon&s=25 Valentin V. Bartenev (Guest)
on 2014-03-26 17:24
(Received via mailing list)
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
2974d09ac2541e892966b762aad84943?d=identicon&s=25 skyice (Guest)
on 2014-03-26 18:17
(Received via mailing list)
Ok thanks but somepage.php is just an examplle and I want this for all
pages
of my website :/

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,248727,248732#msg-248732
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.