我正在尝试从 CI Urls 中删除“index.php”。
我尝试了很多解决方案,但都没有奏效。我已经在 'config.php' 中设置了这些变量:
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";
我当前的 .htaccess 是:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^plugb.com$ [NC]
RewriteRule ^(.*)$ http://www.plugb.com/$1 [R=301,L]
RewriteCond $1 !^(index\.php|files|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
www 前缀部分工作正常。但是'index.php'部分没有。如果你想查看网页,这里是:http ://www.plugb.com/index.php/home