.htaccess file in Codeigniter

How to remove index.php in codeigniter

In this tutorial we are going to learn how to remove index.php from URL using .htaccess file in CodeIgniter. htaccess is the shortened used for Hypertext Access. using this file you can do many things with your website. it is very helpful file. you can also do url rewrite.

Download below code and save .htaccess file

htaccess Code
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Leave a Reply

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