I use regex in Nginx configs to capture file urls but if the file URL contains the # symbol, regex pattern will not capture it.
Here is the part of nginx config.
location ~ ^/p/(?<secure>[\w\-=]+,\d+),(?<user>[^/]+)(?<file>/.*)$ {
}
An example file URL causing the error because it has # symbol in it.
http://mydomain.com/p/KPFHELPFAQrc3rUPIUS7Cg,1401267921,1/4962/Ubuntu#6 (DVD-ISO)/Ubuntu-12-04.iso
You need to change # to %23 in url:
http://mydomain.com/p/KPFHELPFAQrc3rUPIUS7Cg,1401267921,1/4962/Ubuntu%236 (DVD-ISO)/Ubuntu-12-04.iso
Here is complete list of URL Escape Characters
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With