我试图改变我的.htaccess文件,所以如果我去:修改.htaccess使URL变量=真正改变为URL /变量?
http://www.example.com/index.php?login=true
,它去http://www.example.com/login
。
我目前有这个代码,它删除index.php(这使得上面看起来像http://www.example.com/?login=true
)。
RewriteEngine On
#remove index.php
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{THE_REQUEST} !/system/.*
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L]
RewriteCond %{THE_REQUEST} ^GET
我肯定会需要其他变体 - 基本上任何有东西=东西 – Jared