可能重複:
How to remove 「index.php」 in codeigniter’s path嘗試在笨刪除的index.php
1,創建於笨目錄中的.htaccess文件用下面的代碼
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ex/
RewriteCond $1 ^(application|system|private|logs)
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]
RewriteCond $1 ^(index\.php|robots\.txt|opensearch\.xml|favicon\.ico|assets|forums)
RewriteRule ^(.*)$ - [PT,L]
RewriteRule ^(.*)$ index.php/$1 [PT,L]
</IfModule>
2.並將config['index_page']='index.php'
更改爲config['index_page']=''
但它不起作用。我的httpd.conf(在/ etc/apache2的/)是空白