Home htaccess to escape percent (%) from URL
Reply: 0

htaccess to escape percent (%) from URL

user5770
1#
user5770 Published in September 19, 2018, 4:02 am

Having percent sign inside URL, returns bad request (error 400) to the browser. I have a file name that have percent (%) sign, resides at server.

Original File name: 204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1,2%.pdf

Url in browser after clicking on download link:

http://www.example.com/204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1%2C2%25.pdf

This returns 400 error with bad request. I am using Kohana 3.

Existing .htaccess file contents are as follows:

RewriteEngine On

RewriteBase /

<Files .*>
Order Deny,Allow
Deny From All
</Files>

RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php/$0 [PT] 
share|improve this question
  • I would rather try to modify the file name and remove that % and , – Geo Dec 29 '12 at 21:48

1 Answer 1

active oldest votes
up vote 1 down vote
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300429 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO