Reputation: 1772
Nginx seems to be urldecode and match urls when I sent them. Is there anyway to prevent that?
curl https://localhost/schedule/Joe+%2F+%26+Smith
Is getting matched by
rewrite ^/schedule/([^/]+)/([^/]+)$ /a.php?first=$1&last=$2;
Instead of
rewrite ^/schedule/([^/]+)$ /a.php?fullname=$1;
Upvotes: 1
Views: 737
Reputation: 2632
You can't do that easily.
From location directive documentation :
The matching is performed against a normalized URI, after decoding the text encoded in the “%XX” form, resolving references to relative path components “.” and “..”, and possible compression of two or more adjacent slashes into a single slash.
Now, you can use the (very) experimental perl module and encode $r->uri
back in a custom handler.
Upvotes: 1