Welcome Guest, Not a member yet? Register   Sign In
Routing to specific controller in case controller/method is not found.
#3

(This post was last modified: 09-25-2015, 10:53 AM by Muzikant.)

Try something like this:

PHP Code:
$route['controller-1/method-1/(:any)'] = 'controller-1/method-1/$1';
$route['controller-2/(:any)'] = 'controller-2/method-2/$1';
$route['(:any)'] = 'controller-3/method-3/$1'

You can also use:

PHP Code:
$route['something-1/controller-1/method-1/(:any)'] = 'controller-1/method-1/$1';
$route['something-2/controller-2/(:any)'] = 'controller-2/method-2/$1';
$route['something-3/(:any)'] = 'controller-3/method-3/$1'

If you did not, read the URI Routing in the documentation, where you can find more tips.
Reply


Messages In This Thread
RE: Routing to specific controller in case controller/method is not found. - by Muzikant - 09-25-2015, 10:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB