I have two applications in a Codeigniter project. The following is the structure:
/admin /index.php /application /admin /controllers /Dashboard /Product /Post /public /controllers /Home /About /Contact /system /index.php
The public application may work fine. and I can call all controllers with this parameter:
/*----seting in /index.php---*/ $application_folder = 'application/public'; /*----seting in /application/public/config/config.php---*/ $config['base_url'] = 'http://localhost/myweb/'; /*----seting in /application/admin/config/routes.php---*/ $route['default_controller'] = 'Home';
but the admin application cannot work fine. I can call the Dashboard Manager, which is the default controller that I installed. setup looks like this:
/*----setting in /admin/index.php---*/ $application_folder = '../application/admin'; /*----seting in /application/admin/config/config.php---*/ $config['base_url'] = 'http://localhost/myweb/admin/'; /*----seting in /application/admin/config/routes.php---*/ $route['default_controller'] = 'Dashboard';
so when i am:
http://localhost/myweb/ //it will return home page http://localhost/myweb/admin //it will return dashboard page http://localhost/myweb/admin/product //it will return error
can anyone help me fix this case?
source share