Codeigniter 3.x with HMVC - Need URLs in lowercase only

433 Views Asked by At

I have a linux server, as per CI 3 docs, all my class files are ucfirst i.e. Home.php having class Home etc.

What I need is that I should be able to call the url like this http://server/home . As of now it doesn't allow this type of URL because linux is case-sensitive and it can't find home.php .

But, when I try http://server/Home it works. Can anyone help me to get all my URLs to work in lowercase irrespective of what convention is used for file naming.

Please note I am using HMVC for application.

1

There are 1 best solutions below

1
TimBrownlaw On BEST ANSWER

Yep, Linux is case sensitive... I've just had a play with this and it seems that you may have the following folder structure...

application
   modules
      Home <<==== this should be home ( all lower case )
        controllers
           Home.php

If you call your Module folder name Home you will need to call it Home in the url...

If you rename your module folder from Home to home ( all lowercase ) it will work.