我试图从CI Url中删除'index.php'。删除CodeIgniter中的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
http://stackoverflow.com/a/11106074/984422 – 2012-10-16 08:03:19