I have an application that works great when using the full url: sitename.com/index.php/foo/ but when I use HTaccess to remove the index.php it doesn’t seem to work as expected. No matter which page I access I only see the home page. The htaccess file is doing something because without that line I get a 404 error.
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|file-manager-files|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
Thoughts?
On my test site everything works just fine. Is this a server setting that needs to be tweaked?
With Codeigniter you want something like this:
If that is not working, check to make sure
$config['index_page'] = '';and your .htaccess directives are set right:I’ve done hundreds of Codeigniter installs on many OS configs and have always been able to get this to work, but I have had some issues occasionally where I had to get creative to get the
index.phpto disappear.