I am using HMVC with Codeigniter-3.x using MX for both backend and frontend. whole project are in a subdomain. Frontend is working well in both localhost and online domain. In localhost backend is also working well. But backend not working on online domain. the url from the modules are 404.
I have used to define base url as
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
Is there any routing solution for hmvc loader? My project structure is here.
mydomain.com
/subdomain
/system
/asset
/application
/controllers
/models
/views
/modules
/module_1
/controllers
/models
/views
/third_party
/MX
/core
/helper
/config
/....
/backend
/asset
/application
/controllers
/models
/views
/modules
/module_1
/controllers
/models
/views
/third_party
/MX
/core
/helper
/config
/....
I think it is good practice to use single application folder.
For backend you may create a module name with Backend/Admin and keep your controllers their. Hope it will work fine...