Welcome Guest, Not a member yet? Register   Sign In
Default Method for Controllers
#3

[eluser]jdfwarrior[/eluser]
With routes, if you define a default route, it takes precedence over the other routes, which is what its supposed to do. If you use (:any), you have to manually create routes to everything else. They have to be created above the (:any) route in the route.php as well.

For instance:
Code:
$route['blog'] = "blog";

$route['(:any)'] = "$0/dashboard";

Basically goes right down the list, if it finds it before (:any), it goes where it should, if it doesnt find it, it considers (:any) as an, "if all else fails, do this"


Messages In This Thread
Default Method for Controllers - by El Forum - 09-03-2009, 08:35 AM
Default Method for Controllers - by El Forum - 09-03-2009, 08:48 AM
Default Method for Controllers - by El Forum - 09-03-2009, 10:58 AM
Default Method for Controllers - by El Forum - 09-03-2009, 12:29 PM
Default Method for Controllers - by El Forum - 09-03-2009, 12:58 PM
Default Method for Controllers - by El Forum - 09-03-2009, 01:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB