Welcome! Log In Create A New Profile

Advanced

Re: URL decode rewrite handling: + vs. %20

September 03, 2011 06:32AM
splitice Wrote:
-------------------------------------------------------
> edit the php script to do something like this
> before the rest of the script
>
> $_GET['g2_path'] = urldecode($_GET['g2_path'])
>
> ?

That's not the problem - query parameters are automatically decoded by PHP before processing even begins. nginx is turning a + (space) into a %2b (plus). Once it's handed off to the application, it can't tell the difference between a filename that actually had a +, and one that was converted by nginx. It needs to happen before it's handed off to fastcgi.

I've already modified G2 to present URLs which are more accurately encoded, but that doesn't resolve the issue since these URLs have been published for years. They're in search engines, blog posts, etc.
Subject Author Posted

URL decode rewrite handling: + vs. %20

signe September 02, 2011 09:21PM

Re: URL decode rewrite handling: + vs. %20

splitice September 03, 2011 06:24AM

Re: URL decode rewrite handling: + vs. %20

signe September 03, 2011 06:32AM

Re: URL decode rewrite handling: + vs. %20

locojohn September 05, 2011 06:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
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