![]() |
Default Route not working - strange !? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Default Route not working - strange !? (/showthread.php?tid=5415) |
Default Route not working - strange !? - El Forum - 01-21-2008 [eluser]toadle[/eluser] Hey everybody, I just built my first project with CI and everything worked fine on my local development-environment. Now I've moved the project to my server, for client-review. Now I'm experiencing a problem. The default-route doesn't work anymore. http://aem.tim-adler.com (doesn't work) http://aem.tim-adler.com/page (works) In routes.php I have Code: $route['default_controller'] = "page"; and a .htaccess-file which looks like this Code: <IfModule mod_rewrite.c> I tried debugging the HTTP-Request, but this doesn't make any sense either. Would you guys have any advise? Default Route not working - strange !? - El Forum - 01-21-2008 [eluser]toadle[/eluser] I investigated this further: This works http://aem.tim-adler.com/index.php/ however, this does not http://aem.tim-adler.com/index.php What could be the reason for that?! I don't get it, plz help! Default Route not working - strange !? - El Forum - 01-21-2008 [eluser]toadle[/eluser] Found it: The Apache "DirectoryIndex" was not set to set "index.php" Default Route not working - strange !? - El Forum - 01-21-2008 [eluser]toadle[/eluser] Err, no....the error came back! This seems something not reproducable, sometimes it works, sometimes it doesn't.. I'm totally cluelesss, plz someone help me here! Default Route not working - strange !? - El Forum - 01-21-2008 [eluser]ekeretex[/eluser] What do you have as the base_url in the config file? Does it have the ending slash included? Found out it works best for me that way. Default Route not working - strange !? - El Forum - 01-21-2008 [eluser]toadle[/eluser] Yep, I have that set. But I just found something out through code-reading: The method "_get_uri_string" in the Routes-Class hands out something totally senseless in my environment. The path-info that it creates are comming from a totally different page on my server... e.g. I'm requesting http://aem.tim-adler.com/ and _get_uri_string hands out something like /vista-mac-windows/ which is a Python-path from another page on that server....totally weird! What is going in here?! This looks like a bug... Default Route not working - strange !? - El Forum - 01-21-2008 [eluser]toadle[/eluser] I'm self-replying all the time here, cause I wanna make this transparent for other users: I now found a hopefully relyable fix: Setting the $config['uri_protocol'] to "REQUEST_URI"; seems to have fixed it... Default Route not working - strange !? - El Forum - 01-21-2008 [eluser]ekeretex[/eluser] Are you on windows? I did see something somewhere about that being a fix for windows. Default Route not working - strange !? - El Forum - 01-21-2008 [eluser]toadle[/eluser] Nope that system showing the problem is a SUSE 9.3 Linux with Apache 2 and PHP 5.2.5! Default Route not working - strange !? - El Forum - 03-15-2008 [eluser]kenbacca[/eluser] Thanks toadie!!! I was having the same problem and this fixed it. |