Remove the index.php from your codeigniter URL

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”
Next create a .htaccess file in the root of your CI application with the following:
RewriteEngine on
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond % !-f
RewriteCond % !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]