I'm designing a system where the uri's look as following
my-app.com/client-name/admin/foo my-app.com/client-name/admin/bar Where client-name is variable. Obviously I want to put the admin controllers in a sub-folder to maintain my sanity. So my folders can look as following...
/application/controllers/admin/foo.php /application/controllers/admin/bar.php Problem:
From the docs: "Organizing Your Controllers into Sub-folders When using this feature the first segment of your URI must specify the folder."
Is there anyway to get around this?
Could I create an admin controller
/application/controllers/admin.php And use the _remap function to manually load controllers from the subfolder?
update:
My routes look like this
// Admin Root $route['(:any)/admin'] = "admin/welcome"; Then before any controllers load I validate the first URI segment to make sure that client exists.
All clients use the same controllers and routes.