HMVC codeigniter works on local server but not on web server HMVC codeigniter works on local server but not on web server codeigniter codeigniter

HMVC codeigniter works on local server but not on web server


I figured the problem was not with HMVC but was with codeigniter version 3.0. When it comes to unix(which was the operating system running on my server), it is case sensitive. So when I tried to access the controller it could'nt find the file because of case sensitivity and a 404 popped out everytime.

My folder structure before was something like :

-application-->modules--->users---->controllers----->users.php

And the link on which I was getting 404 was www.example.com/users/login

where "users" in the link is controller's name within the "controllers" folder under "modules" folder in my case named as users.php and "login" is the function inside the controller.

All I had to do was to change the case of the first letter of my module and controller name. Now my directory looks like

-application-->modules--->Users---->controllers----->Users.php

note : capitalized "U" in Users module and Users controller.

And the the url I used to access the users controller was : www.example.com/Users/login

And I was good to go.


Finally the problem was solved.this was my folder structure in modules folder.

—modules/

—————/home

————————/Controllers——->home.php

————————/Models——->mdl_home.php

————————/Views——->viewfile.php

all i had to do was change the capitalization on “Controllers”, “Models” and “Views” folders and i was back in business.

now the folder structure is like this and its working perfectly

—modules/

—————/home

————————/controllers——->home.php

————————/models——->mdl_home.php

————————/views——->viewfile.php

Ashish


I had the same problem. When I renamed folders "Controllers" and "Views" to lower case, it worked. Linux debian.

enter image description here