404 error with rewriting rule

2014-04-01 Thread skyice
Hello, With this rule : rewrite ^/([^/])(/.*) $2?locale=$1&$query_string last; I get a 404 error when I try go on http://example.org/en/test.php instead of http://example.org/test.php?locale=en Anyone have any idea to solve the problem ? Thanks. Posted at Nginx Forum: http://forum.nginx.org

Re: How can I rewrite an url with GET parameters ?

2014-03-26 Thread skyice
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 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/list

How can I rewrite an url with GET parameters ?

2014-03-26 Thread skyice
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 ___ nginx maili