我想從CI中的文件路徑中刪除index.php文件。我使用的是Ubuntu 12.04。我嘗試了幾乎所有的論壇結果,但沒有成功。刪除CI中的index.php文件ubuntu 12.04
我把CI文件夾放在這個路徑上。
http://localhost/xxx/CI/
我有Apache重寫MOD啓用。
sudo a2enmod rewrite
Module rewrite already enabled
我也有這個在我的conf.php文件
$config['uri_protocol'] = 'AUTO';
$config['base_url'] = 'http://localhost/xxx/CI/';
$config['index_page'] = '';
$config['index_url'] = '';
我有這個在我的.htaccess文件
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
.htaccess文件是在這條道路
http://localhost/xxx/CI/.htaccess
它也可以通過帕什
/etc/apache2/sites-available/default
AllowOverride All
我得到這個錯誤,當我訪問該文件,這樣
http://localhost/xxx/CI/login/
404 Error
The requested URL /xxx/CI/login/ was not found on this server.
任何幫助將不勝感激。
感謝
您是否收到了404錯誤?你的'.htaccess'文件位於哪裏? –
是的麥克我得到404錯誤。我的.htaccess文件位於此路徑 http:// localhost/xxx/CI /。htaccess的 – Uahmed