PHP webdeveloper and frontend developer




Removing the index.php from your codeigniter URL

Category : PHP, Apache · by Jul 1st, 2010

Codeigniter logo

When you create a standard new codeigniter application, there’s always a index.php in your url. It’s kind of ugly in your url so I prefer to remove this. To remove this you need to do a couple of things:

change the $config[‘index_page’] to $config[‘index_page’]=”“ instead of $config[‘index_page’]=“index.php”

This will only work is mod_rewrite is enabled on your webserver!

Next create a .htaccess file in the root of your CI application with the following:

 

SHARE :

Leave a Reply

Your email address will not be published. Required fields are marked *


s