![]() |
1.6.1 Default Controller causing 404 error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: 1.6.1 Default Controller causing 404 error (/showthread.php?tid=8009) |
1.6.1 Default Controller causing 404 error - El Forum - 05-01-2008 [eluser]kilishan[/eluser] I've got the issue with the blank screen fixed up. Now I'm getting a 404 error. But it only happens on the front screen, where it uses the default controller. I've tracked the error down to the Routes library, in the _validate_request function. The url it's trying to create earlier in the build is missing the controller name. Is this a bug or do I have something bungled? Server is running CentOS 5, PHP 5.2.5, CodeIgniter 1.6.1. Thanks! 1.6.1 Default Controller causing 404 error - El Forum - 05-01-2008 [eluser]gtech[/eluser] if you echo site_url() in a test controller what do you get? say if you have a controller home, and the home controller has mehtod called index: Code: <?php if your base_url is set correctly and index_page = 'index.php' in the config file and the default controller is set to home in the routes file: $route['default_controller'] = "home"; http://<site>/<ci_install>/ http://<site>/<ci_install>/index.php should be the same as going to the url http://<site>/<ci_install>/index.php/home/ 1.6.1 Default Controller causing 404 error - El Forum - 05-01-2008 [eluser]gtech[/eluser] if the above does not work you can try changing the URI protocol and if that does not work change index_page to 'index.php?' in the config.php [url="http://ellislab.com/codeigniter/user-guide/installation/troubleshooting.html"]See the trouble shooting section of the userguide[/url] 1.6.1 Default Controller causing 404 error - El Forum - 05-01-2008 [eluser]kilishan[/eluser] Doh! Changing the URI Protocol worked. I had tried that before, but that was while I was having the other problems, so mentally I had it checked off the "to try" list. Thanks for the reminder. That one was driving me nutty. ![]() 1.6.1 Default Controller causing 404 error - El Forum - 05-01-2008 [eluser]gtech[/eluser] glad to help |