I have created controller file in sub folder of controller.
i have two type of sub folder for backend(admin) and frontend(user).
Structure of Controller
Controller
--backend
---admin.php
---dashboard.php
--frontend
---user.php
I want url for admin panel:
http://localhost/DemoSite/admin_panel/admin/dashboard
admin_panel want it in URL before every backend controller call
admin is Controller
dashboard is Function
For frontend :
http://localhost/DemoSite/user
I have done route like this :
$route['default_controller'] = 'frontend/user';
$route['admin/(:any)'] = "backend/$1";
$route['(:any)'] = "user/$1";