Remove index.php from url in codeigniter

index.php is default the framework routes in CodeIgniter. In this following code we will show you how to remove index.php from url using .htaccess file.

Remove index.php from url in codeigniter
Remove index.php from url in codeigniter

Follow this step for index.php remove form url.

Steps To index.php Remove :-

Step :- 1) Go to application/config and open the file config.php.
Find and Replace the following code in config.php file.

Step :- 2) Go to your CodeIgniter directory(root directory) and create/add .htaccess file.

Path of  directory :-

Step :- 3) Add following code in .htaccess file.

Step :- 4) In some cases of default setting does not work properly for uri_protocol . To resolve this issue Go to application/config and open the file config.php.Find and Replace the following code in config.php file: