Welcome Guest, Not a member yet? Register   Sign In
URI Mapping to another controller
#1

[eluser]Unknown[/eluser]
Hi, I wish to map the URI to another controller, however CI can only access the index() method, while calling other method in the mapped controller, it will give me a 404 error.

Example:
Quote:example.com/admin

Everything works as it is. there is a controller for "admin")

But I wish to map the following URI to its controller.

Example:
Code:
example.com/admin/users
this would be mapped to "users" controller

But, so far CI would only show "users" controller's index() method to me.
but if I tried to access other functions defined in "users" controller (in this example : test() method)

Code:
example.com/admin/users/test
would result in a 404 error


here is my current Routes.php's configuration:
Code:
$route['admin/user'] = "user";
$route['default_controller'] = "admin/query";
$route['404_override'] = '';

Any help would be appreciated!
Thanks!


Messages In This Thread
URI Mapping to another controller - by El Forum - 03-07-2012, 09:44 AM
URI Mapping to another controller - by El Forum - 03-07-2012, 09:56 AM
URI Mapping to another controller - by El Forum - 03-07-2012, 10:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB