I am annoyed with encountering mysterious problem. My development environment has been created with the following directory structure.
document_root
└ project
├ application
│├ controllers
││└ admin
││ ├ Users.php
││ ├ Facility_Categories.php
││ └ Facilities.php
│└ views
│ └ admin
│ ├ users
│ │└ index.twig
│ ├ facility_categories
│ │└ index.twig
│ └ facilities
│ └ index.twig
└ public
└ index.php
In the development environment, these URLs appeared as expected.
https://www.example.com/project/admin/users/
-> load admin/Users.php index function
https://www.example.com/project/admin/facilities/
-> load admin/Facilities.php index function
https://www.example.com/project/admin/facility_categories/
-> load admin/Facility_Categories.php index function
Recently, when I upload these files to a test environment. URL were not displayed correctly that contained "underscore". It looks like controller is not loaded.
https://www.example.com/project/admin/users/
-> load admin/Users.php index function
https://www.example.com/project/admin/facilities/
-> load admin/Facilities.php index function
https://www.example.com/project/admin/facility_categories/
-> 404 Page Not Found (display codeigniter show_404 function)
By the way, if the URL is capitalized, the controller will load but View will not. (view is also displayed if view's direcotry name is capitalized.)
https://www.example.com/project/admin/Facility_Categories/
-> 500 Internal Server Error
(Twig\Error\LoaderError : Unable to find template "admin/Facility_Categories/index.twig")
I want to access with lower case URL. How can I solve the problem?