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

[eluser]Unknown[/eluser]
Hello,

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
#2

[eluser]brianw1975[/eluser]
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.
Code:
$route['default_controller'] = "main";

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

[eluser]bretticus[/eluser]
Sorry, wrong thread. Couldn't delete this response...




Theme © iAndrew 2016 - Forum software by © MyBB