【发布时间】:2010-10-22 12:24:06
【问题描述】:
在 URL 中包含百分号,向浏览器返回错误请求(错误 400)。我有一个带有百分号 (%) 符号的文件名,驻留在服务器上。
原始文件名:
204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1,2%.pdf
点击下载链接后浏览器中的网址:
http://www.example.com/204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1%2C2%25.pdf
这会返回带有“错误请求”的 400 错误。我正在使用 Kohana 3。
现有.htaccess文件内容如下:
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]
【问题讨论】:
-
我宁愿尝试修改文件名并删除
%和,