Rewrite automatically unencodes question mark.

Maxim Dounin mdounin at
Wed Aug 8 17:58:37 UTC 2012


On Wed, Aug 08, 2012 at 01:12:46PM -0400, jimishjoban wrote:

> It seems only the first %3F gets un-encoded. Remaining %3F remains as it
> is... Could it be a bug?

More or less yes, it's weird historic behaviour which should be 
eventually fixed (and we even have several TODO test cases 
for this, see

For now I would recommend using

    return 301 $uri;

which doesn't try to do any unescaping.

Maxim Dounin

More information about the nginx mailing list