CodeIgniter Framework remove index.php from url with .htaccess
Before we begin please go and read this http://codeigniter.com/user_guide/general/urls.html if you don’t already have knowledge about the subject. If you have and you only want to see how we did it than let me tell you that the only thing that is different and that is the .htaccess content.
We wanted to remove the index.php from being visible in our urls. Before we do that we need to make ourself sure that we have installed mod_rewrite and everything it’s up and running properly. After we installed CodeIgniter and edited our .htaccess file place the file in the root folder.
And after you make sure that you did everything and you’ve read the article from CodeIgniter User Guide than you can copy and paste the code:
1 2 3 4 5 |
RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] |
Save the file and you’re done.

















WOW!!! thanks! been looking for the solution since yesterday. you’ve saved me.
Glad it help.
Enjoy.