Codeigniter Index Controller routing problem Codeigniter Index Controller routing problem codeigniter codeigniter

Codeigniter Index Controller routing problem


The documentation actually states that a controller can't be named 'index' because it's a reserved word.

If you goal is to get pretty URL's you should leave the default controller as it was originally and leave the $config["index_page"] variable empty.

Then create this .htaccess file:

Options +FollowSymLinksRewriteEngine onRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ /index.php/$1 [L,QSA]

That would make CI and you a happy couple...