CodeIgniter Forums
How to force a default controller located in a 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: How to force a default controller located in a subdirectory of /controllers (/thread-47685.html)



How to force a default controller located in a subdirectory of /controllers - El Forum - 12-18-2011

[eluser]luismartin[/eluser]
I've arranged the controllers of a website so that I have both frontend and backend separated, this way:

/controllers/frontend-controllers
/controllers/admin/backend-controllers

There is no problem with the frontend since it is the normal behaviour in CI. But regarding the backend, I have to specify the default controller, which is index, like this:

http://www.domain.com/admin/index

If I obviate index

http://www.domain.com/admin

the application displays the frontend while keeping the URL.

What should I do to display the admin/index controller instead?