CodeIgniter Forums

Full Version: Routing question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.

I have created a sub-directory under application/controllers/  called "Admin". In there I created a controller called "Admin.php"

Similarly in views I created a subdirectory called "admin"

In routes I added this line: 


PHP Code:
$route['admin'] = "admin/admin"

Now I can access my admin folder by going to mysite.com/admin/

Then I created a new controller called "Controllers/Admin/Settings.php" and a view file called "admin/settings.php"

I'd like to access it by going to mysite.com/admin/settings but I get a 404 error. I tried every variation in route I could think of, but I can't figure it out.

Thanks for any help.
Do you have more rewrite rules? Because that's the only thing you need under CI 3.1.9.
Are your functions named index() inside your Settings.php/Admin.php?
Oh, thanks. I didn't name the function "index".