Welcome Guest, Not a member yet? Register   Sign In
Routing Question


Right now, in my routing.php file I have:

$route[':any'] = 'main/index';

So, this calls to the main class, index function and serves basically as a template.

Although, in my controller folder I have a folder 'admin' with a Home class and other classes.
Before I put in the :any exception, and I went to http://mysite.com/admin, it would pull up classes how it was supposed to. After I put it in, going to that url just throws a 404.

Help would be appriciated,
Thanks in advance!

- Mike

well, 1st, there is no need to put index in the route - the index function is called by default in every controller, unless you are trying to override the _remap function, which i don't know if that is possible.

2nd, in route.php set "main" as your default controller -- this should already be in there anyways.
$route['default_controller'] = "main";

remove your route from routes.php because it's redundant and obviously screwing up your admin section
$route[’:any’] = ‘main/index’;

Sorry, wrong thread. Couldn't delete this response...

Theme © iAndrew 2016 - Forum software by © MyBB