Non Existent Controllers in a Sub Directory don't fallback to function in default controller |
[eluser]ptrippett[/eluser]
in this example $routes['default_controller'] = 'default_controller' If I have the following directory structure Code: controllers/ http://site.com/posts/tags loads the tags.php controller but the a request to http://site.com/posts/delete retrunes a 404 not found even if the function is defined in the default_controller.php. CI is not falling back to the default controller before decided that the file can not be found. This is an easy fix in Router.php line 215 Code: // Does the requested controller exist in the sub-folder? Why is this beneficial? You may want to use a subdirectory to segment code but also keep general functions under /posts. as in the example above move all tag related functions into tag.php for /posts/tags/[create|delete|view] but maintain /posts/[create|delete|view] without having to prefix these end points with /posts/[addTag|deleteTag|viewTag] etc |
Messages In This Thread |
Non Existent Controllers in a Sub Directory don't fallback to function in default controller - by El Forum - 08-16-2010, 09:44 PM
Non Existent Controllers in a Sub Directory don't fallback to function in default controller - by El Forum - 08-17-2010, 12:21 AM
Non Existent Controllers in a Sub Directory don't fallback to function in default controller - by El Forum - 08-17-2010, 08:45 AM
|