Unable to load default controller on 404 errors. |
[eluser]CroNiX[/eluser]
If you believe there is a bug, submit a bug report. That's how things get fixed.
[eluser]Aken[/eluser]
[quote author="sehummel" date="1326908953"]I figured it out, thanks to you. The var_dump showed me it was trying to load the folder name as the controller (misc/site_map => misc). Once I moved the site_map controller into the root of the controllers folder, it worked fine. Thanks, so so much![/quote] I don't believe this is a bug based on what you said here. It sounds like you were putting your controller in a subdirectory, but were trying to access a standard controller URL. Here's an example. Let's use that controller you just created: Code: class Misc extends CI_Controller If you placed this file in your root controllers directory (application/controllers), the URL to access the site_map() function would be: example.com/misc/site_map If you then created a folder in your controllers directory, called "misc", and moved your controller file into that directory, the URL for accessing the site_map() function would then change to: example.com/misc/misc/site_map CodeIgniter does not automatically match the subdirectory to a controller file of the same name and then map it accordingly. It's just how the URL structures work - if CI did that, then people would probably get confused all the time. Again, it's not a bug, but a limitation or lack of a feature. You have to define a route to tell CI where to find any default pages inside subdirectories. A couple of CI docs pages that might help make it more clear: http://ellislab.com/codeigniter/user-gui.../urls.html http://ellislab.com/codeigniter/user-gui...subfolders |
Welcome Guest, Not a member yet? Register Sign In |