encoded url

J.J J jujj603 at gmail.com
Sun May 24 00:08:55 UTC 2015


For http://www.mywebsite.com/image.php%3Fid%3D12345, the uri is
"/image.php?id=12345" after decoded,
so nginx may try to find file with name "image.php?id=12345" based on your
config file. That's why you got 404.
For http://www.mywebsite.com/image.php?id=12345, the uri is "/image.php"
and argument is "id=12345".

If you want a uri with argument, the '?' should not be encoded, check this
<https://tools.ietf.org/html/rfc3986#section-3>

URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]



On Sun, May 24, 2015 at 1:56 AM, pierob83 <nginx-forum at nginx.us> wrote:

> Hello everyone,
>             I've nginx 1.2.5 and I've an issue about encoded URLs.
> Is there a way to make nginx accepts URL like the following:
>
>
> http://www.mywebsite.com/image.php%3Fid%3D12345
>
> as equivalent of the following?
>
> http://www.mywebsite.com/image.php?id=12345
>
>
>
> In my current configuration, the first URL is 404 not found, and the second
> one works.
>
> Many thanks
>
> PB
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,259076,259076#msg-259076
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150524/6f31d4e0/attachment.html>


More information about the nginx mailing list