404 on default controller |
[eluser]Rian[/eluser]
I'm running circles here, I've avoided looking at the problem for a while and then tried to fix it again but I'm just really out of luck. http://backend.example.com/ < CI 404 http://backend.example.com/index.php < CI 404 http://backend.example.com/index.php/Main < works http://backend.example.com/Main < works default controller is set to "Main", I have also tried "main"; Log output based on "main" and "Main" as default controllers: Code: DEBUG - 2008-07-10 14:20:45 --> Config Class Initialized Someone PLEASE make me go "duh" and beat myself up over the stupid simple mistake I made ![]()
[eluser]sophistry[/eluser]
a few things... do you have .htaccess set up? what does it look like? what are your routes? what order are they in? do you have a dir at your webroot called main or Main? when you say the last example "works" what does that mean? are you sure it is calling the controller you want? EDIT: whohoo! reached 500 posts.
[eluser]developer10[/eluser]
[quote author="Rian" date="1215700924"]I'm running circles here, I've avoided looking at the problem for a while and then tried to fix it again but I'm just really out of luck. http://backend.example.com/ < CI 404 http://backend.example.com/index.php < CI 404 http://backend.example.com/index.php/Main < works http://backend.example.com/Main < works default controller is set to "Main", I have also tried "main"; Log output based on "main" and "Main" as default controllers: Code: DEBUG - 2008-07-10 14:20:45 --> Config Class Initialized Someone PLEASE make me go "duh" and beat myself up over the stupid simple mistake I made ![]() maybe you didnt set up your base URL? in /application/config/config.php edit this line: Quote:$config['base_url'] = "http://backend.example.com/";
[eluser]Rian[/eluser]
Code: $ cat .htaccess lessee: - I don't have any routes set, - I don't have a "main" or "Main" folder, - the base URL is properly configured, so is the index_page variable (empty for htaccess usage) I'm sure it's calling the controller it should simply because the site works then ![]() ![]() Congrats on the 500 (504 now!) posts ![]()
[eluser]sophistry[/eluser]
are you running multiple apps off one CI codebase? well, i'm out of ideas... except to tell you to do a clean/new install of CI and see if you can use default route out of the box. if you can, then there is something wrong with your CI configuration - maybe change the name of the default controller (main is not a reserved word, but maybe too common)? if you can't get default route to work on fresh install (with your .htaccess in place) then take out .htaccess and see if it works. if you can't get default route to work at all, then something is wrong with the server configuration and or mod_rewrite.c cheers. |
Welcome Guest, Not a member yet? Register Sign In |