1

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
                      /....
Nirjhar Mandal
  • 227
  • 1
  • 2
  • 8

1 Answers1

0

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...

Kanny
  • 1
  • 3
  • Its a vast issue where I have to separate as frontend and backend. each project has different and so many modules. BTW problem solved. It was php version and module name case issues. thanks – Nirjhar Mandal Nov 08 '17 at 11:09