CodeIgniter Forums
Default controller for subdirectory of controllers? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Default controller for subdirectory of controllers? (/thread-10423.html)



Default controller for subdirectory of controllers? - El Forum - 07-30-2008

[eluser]Bramme[/eluser]
Hey all

My application has a backend part, which I placed in a subdirectory off my controllers.

This works great, but I was wondering if there was a way to set a second default controller for that subdirectory.

At the moment I have this in my routes.php config file

Code:
$route['default_controller'] = "content";
$route['scaffolding_trigger'] = "";

$route['admin'] = 'admin/general';
$route['admin/'] = 'admin/general';
$route['admin(.*)'] = 'admin$1';
$route['(.*)'] = 'content/$1';

I was just wondering if there was any way to make this more efficient...