CodeIgniter Forums
Removing index.php from links generated by Ci [SOLVED] - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Removing index.php from links generated by Ci [SOLVED] (/showthread.php?tid=40649)



Removing index.php from links generated by Ci [SOLVED] - El Forum - 04-14-2011

[eluser]lenswipe[/eluser]
Hi guys

Im new here so if this has already been posted and solved i apologise, however ive noted that CI has a tendancy to put /index.php/ in the links it spits out, what i mean by that is that i thas when it creates say a form it has the form action as:

<form action="domain.com/index.php/blog">

ive googled in various places and all i can come up with is a .htaccess tutorial at best(which doesnt really prevent it spitting this out).

Note: I do have URL Rewriting working, so if you were considering posting about .htaccess - dont bother, ive already been there Smile

Regards

-Robert


Removing index.php from links generated by Ci [SOLVED] - El Forum - 04-14-2011

[eluser]lenswipe[/eluser]
Solved it guys with this helpful post here: http://ellislab.com/forums/viewthread/65085/ from Michael Wales - thanks Michael!


To cut a long story short, you need to go into the config.php file and change:
Code:
$config['index_page'] = 'index.php';
to
Code:
$config['index_page'] = '';



Removing index.php from links generated by Ci [SOLVED] - El Forum - 04-14-2011

[eluser]InsiteFX[/eluser]
Guess you didn't read the CodeIgniter User Guide! LOL

InsiteFX


Removing index.php from links generated by Ci [SOLVED] - El Forum - 04-15-2011

[eluser]lenswipe[/eluser]
it would seem that way... Smile