CodeIgniter Forums
URI cannot load - 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: URI cannot load (/showthread.php?tid=30801)



URI cannot load - El Forum - 05-26-2010

[eluser]elmne[/eluser]
I have a uri like this

Code:
/index.php/folder/folder/class/function

But it won't work, i get the following error


Quote:404 Page Not Found
The page you requested was not found.

Is it possible to have controllers under 2 subfolders?


URI cannot load - El Forum - 05-26-2010

[eluser]vitoco[/eluser]
it doesn't work for me...only one subfolder in controllers
Quote:404 Page Not Found
The page you requested was not found.

Is it possible to have controllers under 2 subfolders?[/quote]


URI cannot load - El Forum - 05-26-2010

[eluser]vitoco[/eluser]
checking the ROUTER library ...
Code:
function _validate_request($segments)
    {
        // Does the requested controller exist in the root folder?
        if (file_exists(APPPATH.'controllers/'.$segments[0].EXT))
        {
            return $segments;
        }

        // Is the controller in a sub-folder?
        if (is_dir(APPPATH.'controllers/'.$segments[0]))
        {        
            // Set the directory and remove it from the segment array
            $this->set_directory($segments[0]);
            $segments = array_slice($segments, 1);
.....

only one subfolder it's getting checked.

If you want to use folders for your controllers...it may help to organize them as modules using HMVC..