CodeIgniter Forums
Configuring routes for controllers/admin subfolder - 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: Configuring routes for controllers/admin subfolder (/thread-9407.html)



Configuring routes for controllers/admin subfolder - El Forum - 06-24-2008

[eluser]CARP[/eluser]
Hi guys
I've created a CI app, and now I'll begin building an admin backend for it
I've set a default controller to be called (for frontend)

$route['default_controller'] = "frontend";

and now I've created an "admin" folder inside /controllers for putting the controllers related to admin area

How should I do the routes configuration?, so when users go

myapp.com/admin

they are shown or redirected to the default admin controller? Is this possible?

Thanks a lot in advance...


Configuring routes for controllers/admin subfolder - El Forum - 06-24-2008

[eluser]Clooner[/eluser]
Try to use "directory/controller/function" in the routing! So this could be "admin/admin/index"


Configuring routes for controllers/admin subfolder - El Forum - 06-24-2008

[eluser]CARP[/eluser]
[quote author="clooner" date="1214337094"]Try to use "directory/controller/function" in the routing! So this could be "admin/admin/index"[/quote]

Hi
Didn't understand a word, I just only wanted to know what to put (apart from this line)
$route['default_controller'] = "principal";
in the config/routes.php file
so when visitors call /admin, a default controller gets called automatically (if possible)

Thanks