CodeIgniter Forums
Subfolders, htaccess [newbie] - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Subfolders, htaccess [newbie] (/thread-12440.html)



Subfolders, htaccess [newbie] - El Forum - 10-19-2008

[eluser]CrustyDOD[/eluser]
Hey!

I've just started to use CI, and right away i have a problem.

Following the guide, i've split my files to different folders. I can't make them work tho!

I've created a simply test file just so you see what i have so far..

Location: controllers/testme/testme.php
Code:
class Testme extends Controller
{

    function __construct()
    {
        parent::Controller();
    }

    public function index()
    {
        echo 'index of test';
    }
    
    public function test()
    {
                echo 'test function';
    }
}

Calling it:
domain.tld/testme/test <-- 404 error
domain.tld/testme/index <-- 404 error
domain.tld/testme <-- shows default page/class

Default class contains only index() function which is set as default controller in routes.php. Default controller is not in its own subfolder but in main controllers folder.

What am i missing here?


Subfolders, htaccess [newbie] - El Forum - 10-19-2008

[eluser]CrustyDOD[/eluser]
:S
My bad.. I just realized that i was missing something in the URL, the folder itself..

Works now..

domain.tld/testme/testme/test