Welcome! Log In Create A New Profile

Advanced

Re: encoded url

J.J J
May 23, 2015 08:10PM
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@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@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

encoded url

pierob83 May 23, 2015 01:56PM

Re: encoded url

J.J J May 23, 2015 08:10PM

Re: encoded url

Francis Daly May 27, 2015 06:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 324
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready