How to remove index php from url in codeigniter 3

How to remove index php from url in codeigniter 3

Today,  we will learn how to remove index.php from URL in Codeigniter. why are you remove index.php from URL? because when user using create SEO friendly, user readability and easy to understand for the user.

Now, let’s start to discuss how to remove index.php from URL in Codeigniter.

Apache setting.

First,  we will enable the “mod_rewrite” on apache server. because it gives permission of httacess rewrite, for that we need to enable “mod_rewrite”. after enable then restart the apache server.

Updating Config file

After then we will update the below configuration setting in the “application/config/config.php” directory.

Creating httacess file

Finally,  we will create htaccess file and paste the below code in this file and that file put on the root directory project.

Please follow and like us: