Rewriting uri as querystring using nginx?

António P. P. Almeida appa at perusio.net
Thu Feb 23 16:02:20 UTC 2012


On 23 Fev 2012 06h45 CET, nginx-forum at nginx.us wrote:

> How do I rewrite URIs of the form
>
> http://domain1/one/two?three=four
>
> to
>
> http://domain2?path=http%3A%2F%2Fdomain1%2Fone%2Ftwo%3Fthree%3Dfour

To escape you need to do a capture.

rewrite ^(.*)$ http://domain2?path=$1;

--- appa



More information about the nginx mailing list