Hy. I have 2 controllers, the first one application/classes/controller/welcome.php and the second one application/classes/controller/admin/welcome.php.
And I have the following routings, set in bootstrap.php
Route::set('admin', '(<directory>(/<controller>(/<action>(/<id>))))', array('directory' => '(admin)'))
->defaults(array(
'directory' => 'admin',
'controller' => 'welcome',
'action' => 'index',
));
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'welcome',
'action' => 'index',
));
If I access example.com/welcome it calls index action from the application/classes/controller/welcome.php controller (this is good), if I access example.com/admin/welcome it calls index action from application/classes/controller/admin/welcome.php controller (this is good),
but if I access simply example.com, it calls the admin's welcome and not the other one, and I can't understand why.
I want this: if I access example.com, then call index action from application/classes/controller/admin/welcome.php controller. How can I solve this?