The project I took over is a CI framework. After writing several classes, the following phenomenon occurred:
Routing access situation:
Localhost:70/project name/index.php/apicontent /method: Can visit
Localhost:70/project name/index.php/moment/method: Can visit
****://domain name/apicontnt/method: Can visit
****://domain name/moment/method: 404 not found
In the mid-term, the domain name is the online environment.
The routing configuration is as follows:
$route['default_controller'] = 'content/index';
$route['(:any)'] = 'home/index/$1';
What are the possible reasons? Please give me some guidance, thank you very much! ! !
This issue has been resolved.
The reason is: the online CI version is 2, while the offline CI version is 3. The offline version supports lowercase first letters of file names, while the online version only supports uppercase first letters of file names, so The result is that when a file that runs well offline is uploaded online, the file name cannot be found.
The second inspiration is that it is not sensitive to error messages. The error has been reported as not found, which at least indicates that the method is correct. At this time, you should no longer suspect routing configuration errors, but should focus directly on the direction of not finding the file.