URL中的CakePHP 2.9编码的Chars返回Bad Request

时间:2018-02-02 15:46:12

标签: apache .htaccess cakephp cakephp-2.0

我有一个CakePHP应用程序,需要能够在网址中设置像%作为get参数的特殊字符

我正确编码为"%25"但是修改错误"错误的请求"。 编码我的网址两次(例如%2525)然而工作正常....

我尝试了其他解决方案,例如将/app/webroot/.htaccess更改为

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php [QSA,B,L]
</IfModule>
到目前为止没有成功。

错误已经发生,因为app / webroot中的index.php被调用,所以我假设它有一个htaccess错误

root和/ app .htaccess是基于cakePHP的文档(https://book.cakephp.org/2.0/en/installation/url-rewriting.html)配置的

0 个答案:

没有答案