我想从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