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

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Default controller for subdirectory of controllers? (/showthread.php?tid=10423)



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...