So I have set up my routes like so:
$route[':any'] = "main";
$route['products/(:any)'] = "products/product/$1";
For example www.mysite.com/something goes to main controller, where I deal with "something". With products I deal in similar way.
But as you can see after that I have to write down all the other controllers with methods that I wish to be used instead of main controller. Is there a way to make it automatically detect if the controller exists use the controller and not the default "main"?
$route['products'] = "products";
$route['admin/user/login'] = "admin/user/login";
$route['admin/user/logout'] = "admin/user/logout";
$route['admin/migrations'] = "admin/migrations";
$route['admin/dashboard'] = "admin/dashboard";