rewrite URI include "&" problem

Olivier Bonvalet mailinglist at daevel.fr
Wed Feb 4 19:15:40 MSK 2009


Hello,

and if you correctly encode the "&", it doesn't work ? (function 
rawurlencode() in PHP)

lhmwzy a écrit :
> I have a rewirte rule:
>                 if (-f $request_filename ) {
>                         rewrite ^/(.*/)(.*)$
> /file.php?path=$1$2&filename=$2 last;
>                 }
> if a URI include "&",the file.php will not function normally.
> For example:
> request /1&2/test.txt
> the php file file.php will return "$path=1" and "$file=test.txt"
> the correct is "$path=1&2/test.txt" and "file=test.txt"
>
> How to resolve this problem?
>
>   






More information about the nginx mailing list