Welcome Guest, Not a member yet? Register   Sign In
Routing issue?
#3

[eluser]Joe Dawson[/eluser]
[quote author="CroNiX" date="1350161319"]1) base_url needs a trailing slash (http://www.joedawson.me/labs/codeigniter/)
2) home controller (index method) is what gets called when going to your site root (no controller in the URL) (what the base_url is). A homepage. If you want to access other methods in the home controller, you have to call them like any other controller (controller/method) unless you use (additional) routes.
3) You get the 404 because to access the "stats" method of the "Portal" controller, you need to access it like:
http://http://www.joedawson.me/labs/codeigniter/index.php/portal/stats

[/quote]

Hey,

Thank-you for the reply!

1: Thank-you, I've added the trailing slash
2: I think I got confused here, I assumed that you could access the 'default_controller' that is set inside of 'routes.php' can be accessed like so: http://mydomain.com/index.php/method
3: Going back to point 2, is there a way to call a method from the 'default_controller' without having to pass the controller name into the URL?

Thanks again!


Messages In This Thread
Routing issue? - by El Forum - 10-13-2012, 01:27 PM
Routing issue? - by El Forum - 10-13-2012, 01:48 PM
Routing issue? - by El Forum - 10-13-2012, 02:00 PM
Routing issue? - by El Forum - 10-13-2012, 02:04 PM
Routing issue? - by El Forum - 10-13-2012, 02:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB