Log in

How to remove index.php from url in codeigniter php

We see number of times that our page contain index.php in url, becouse of that out complete url do't seems to be friendly.
 So we need to remove this , here is the trick how to remove it -
1. Go to your root folder in which you want to remove index.php from url.
2. Open application folder then config folder then you see a file named config.php
/htdocs/your_base_folder/application/config/config.php
3. Open this file and now here find a variable below your base_url variable, same like -

$config['index_page'] = 'index.php';

4. Change above with the following (remove index.php same like below) - 
$config['index_page'] = '';

Now refresh the url you will see your page is opening without index.php in url.

That's it.....

For any issue regarding codeigniter feel free to contact me or subscribe my blog for more tricks...

Thank you....!

Comments (2)

by webs 2018-09-16

this is a awesome post.

by webs 2018-09-16

great article.

Add comment:


Contact Us

YourmobileWorld.com

support@yourmobileworld.com