我在我的网站上使用这个 htaccess 文件来删除 index.php。
RewriteEngine on
RewriteCond $1 !^(index\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
但是这个文件不起作用。在 Apache 模块中启用了重写。使用的 codeigniter 版本是 2.0.1。