我知道這個問題之前被問過很多次,而且我已經經歷了大部分,但是找不到解決方案。我已經嘗試了大多數here,here和CodeIgniter官方文檔中給出的答案。並且每次都重新啓動apache。它不適合我。 mod_rewrite
已在我的apache服務器中啓用。如何使用.htaccess在CodeIgniter中刪除index.php
奇怪的是,我已經爲WAMP工作示例(在我的筆記本電腦):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /project/index.php
</IfModule>
它完美的WAMP,但它不能在LAMP工作。任何形式的幫助表示讚賞。
你遵循這一步呢? $ config ['index_page'] =';;' –
@prakashtank是的,我試過了。 –
檢查此http://stackoverflow.com/a/31785445/4595675 –