Defautlt Contoller in CodeIgniter

Posted by gregavola on Stack Overflow See other posts from Stack Overflow or by gregavola
Published on 2010-04-06T15:11:35Z Indexed on 2010/04/06 15:13 UTC
Read the original article Hit count: 159

Filed under:
|
|

Hello everyone,

I am wondering if there is any other configuration options for a default controller.

For example - if I have a controller called "site" and I set the default controller in the following file: application/config/routes.php to: $route['default_controller'] = "site";

I should be able to go to http://localhost and that brings up the index(); function in the site controller.

However, if I try to do go to http://localhost/index.php/index2 to load the index2(); function I get a 404 error. If i change the URL to http://localhost/index.php/site/index2 it works fine - but I thought already set the default controller. Is there any way around this?

Any thoughts?

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about php