Looking to Build/Redesign a Website or Blog ?

To speak to Rakshit, call +91 968 704 2303

Remove index.php from URL in CodeIgniter

Hello Friends,

I am working with CodeIgniter Framework since last 3 months. I have worked on CakePHP and Zend Framework before. But when I setup CodeIgniter, I was trying to access it but I was not able. Later, I came to know, it is including index.php in url. I wrote a couple of lines in .htaccess to remove index.php from CodeIgniter. If you are looking for the same, than just copy and paste the below code in your .htaccess file which is in root directory.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

If you search for How to remove index.php from URL CodeIgniter, Remove index.php from CodeIgniter URL, CodeIgniter URL remove index.php than above is a simple solution for you.

Comment me if you face any problem. I will be happy to help you.


No Comments Yet.

Leave a Reply

Your email address will not be published.