Controllers in sub-folders don't seem to work |
[eluser]Unknown[/eluser]
edit: Nevermind, i forgot to add in index.php. i'm an idiot. :p Hello, I'm trying to organize all my controllers into sub-folders. As per the documentation, the first section of the url must be the folder name followed by the controller name like so Code: www.exampl.com/subfolder/controller/segment1/ I have done this but i'm still getting a 404 not found page. Currently, this project sits within: localhost/project which I assume would cause the above method to break since the first segment is "project", in this case. But I modified my DocumentRoot in my hosts file so that "localhost" alone points to: localhost/project. Still getting the 404 error though. Any one know why? Thanks!!
[eluser]InsiteFX[/eluser]
You need to setup routes for them. Code: $route['subfolder/controller/(:any)'] = 'subfolder/controller/$1'; CodeIgniter User Guide - URI Routing |
Welcome Guest, Not a member yet? Register Sign In |