Yes, another one of these. I\'ve tried everything I could find on the search with no luck.
In my httpd.conf (running centos and apache2):
You need to make sure that in your virtual host you have:
<Directory "/path...to directory">
Order allow,deny
Allow from all
Allowoverride all
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine on
</IfModule>
Two points of advice:
1.) Be sure you are saving/editing the .htaccess file into the root of your project folder, and not the .htaccess in your /applications folder. Such that, if my applications folder was at, project/application, don't edit the project/application/.htaccess file. You need your file to be located at project/.htaccess
2.) Use the following in your .htaccess file:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
The rules in the original post (and in the CI user guide) can be used to allow URLs to work without /index.php/
in them, but will NOT remove /index.php/
from existing URLs.
You can set $config['index_page'] = '';
(removing index.php
) in the CI config to remove index.php
from CI-generated URLs.
If the original rules do not work, please give these rewrite rules a try:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]