CodeIgniter Forums
a little controller help - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: a little controller help (/showthread.php?tid=32608)



a little controller help - El Forum - 07-28-2010

[eluser]natefons[/eluser]
so i just got into CI and learning the ins and outs of it. i have a quick question, and i apologize if its been asked/answered before.

my question is using controllers/views.

now from my understanding, when you have a function n your controller, you can access that function using:

example.com/index.php/controllername/function/arguments/

what im wondering is, is it possible to hide the index.php and call the controller directly?

-Nate


a little controller help - El Forum - 07-28-2010

[eluser]mddd[/eluser]
Welcome to CodeIgniter.
Yes this is possible and in fact is used by many people on most projects.
Use a .htaccess file to rewrite the url and get rid of index.php.
The CI manual explains this on one of the first pages.
If you're starting on CI, it is well worth reading the complete manual. It's not that long and will give you lots of useful information.


a little controller help - El Forum - 07-28-2010

[eluser]natefons[/eluser]
hey thanks for the quick reply!
yea, reading is not my strong point, but ill take some time to read it all!

thank you
Nate