鍍金池/ 問答/PHP  Python  Linux  網(wǎng)絡(luò)安全/ %85%AE使Apache的Rewriter失效???

%85%AE使Apache的Rewriter失效???

我在.htaccess文件里面添加了如下內(nèi)容:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

然后當我輸入http://127.0.0.5/Style/main/本兮http://127.0.0.5/Style/main/%... )進行訪問時,出現(xiàn)了apache自帶的404頁面,但把后面的“本兮”換成其他漢字時訪問是正常的!??!
經(jīng)過我的排查,發(fā)現(xiàn)只要訪問所用的漢字的url編碼中含有“%85%AE”就會導致404?。?!
我還發(fā)現(xiàn)了另外一個神奇的BUG:當訪問http://127.0.0.5/兮http://127.0.0.5/%E5%85%AE )時,服務器報404 Object not found,,,
但是當訪問
http://127.0.0.5/%85%AE
http://127.0.0.5/%85
http://127.0.0.5/%AE
服務器會報403 Access forbidden
這是怎么回事???

回答
編輯回答
愛礙唉

RewriteRule ^(.*)$ index.php/$1 [QSA,NU,PT,L]

在偽靜態(tài)規(guī)則后面加上 [QSA,NU,PT,L] 配置完成

2017年11月20日 18:28