1
我的问题是,当我输入http://example.com/admin/
时效果很好,$_GET['decode']
包含正确的信息,我可以使用它。但是当我输入http://example.com/admin
(没有斜杠)时,我的URL重定向到http://example.com/admin/?decode=admin
,并且一切都搞乱了。有人可以帮助我吗?URL漏洞末尾的斜线.htaccess
这里是我的.htaccess
:
RewriteEngine on
Options +FollowSymlinks
<FilesMatch "(config.php|defines.php|functions.php)">
Order Allow,Deny
Deny from all
</FilesMatch>
Header set X-UA-Compatible "IE=Edge,chrome=1"
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]
RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
RewriteRule ^([^\.]+)$ ./index.php?decode=$1 [L,QSA]
php_value date.timezone "Europe/Bratislava"
抱歉,但这是不工作的权利 – debute
现在就来试试。我在顶部添加了“DirectorySlash Off”。 – anubhava
它仍然将我重定向到'/ admin /?decode = admin' – debute