Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]How do I route a controller in HMVC
#1

[eluser]Cgull[/eluser]
Developing with CI 2.1.3

Using HMVC to create a module out of ion_auth.

I created another controller under application/modules/auth/controllers
called user

When I go to:
mysite/auth/user - page not found
mysite/user - page not found

What do I need to put in the module's routes file so auth/(:any) will go to the auth controller and user/(:any) will go to the user controller?

I tried:
Code:
$route['auth/(:any)'] = "auth/$1";
$route['user/(:any)'] = "user/$1";


#2

[eluser]Cgull[/eluser]
In my routes file:
Code:
$route['default_controller'] = 'auth';
$route['user/(:any)'] = "user/$1";

Now if I go to mysite/auth/user it goes to the user controller.




Theme © iAndrew 2016 - Forum software by © MyBB