Welcome! Log In Create A New Profile

Advanced

Problem with the lack of url encoding in the rewrite result url

Alexander Radostin
December 28, 2009 04:44PM
Hi everyone!

Recently we've moved from lighttpd to nginx and I've discovered a problem
with the different rewrite handling in nginx.

The rule:

rewrite ^/download/([^/]+)/(.+)/$
/index.php/download/?hash=$1&filename=$2 last;

works fine, but the $1 and $2 args in the result url are not url encoded and
sometimes we have "&" in the filenames which brakes the resulting query
string by cutting the file name and adding another variable. Encoding & as
%26 in the source url doesn't help. Is there a way to enable url encoding of
the args for the result url?

***
Alexander Radostin
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Problem with the lack of url encoding in the rewrite result url

Alexander Radostin December 28, 2009 04:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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