Help needed w/ routing |
[eluser]Unknown[/eluser]
I'm new to CI and am creating a web app that will utilize custom URLs to determine what data to display. For example, the URL scheme looks something like this, or a hierarchical alternative of this: Quote:www.website.com/grandparent/parent/childI have a controller called "feed" which I would like to handle those dynamic URLs, but I also have a controller called "user" which handles user registration, login, settings, etc. Quote:User registration/login/settings: www.website.com/user/[function] Doing $route[':any'] = "feed"; obviously results in breaking the registration and login as contained in the "user" controller. How can I establish a route that routes everything to the "feed" controller, but does not change the route of requests to the "user" controller?
[eluser]Eric Barnes[/eluser]
I believe the order of routes is important. So in your case something like this: Code: $route['user/(:any)'] = "user/$1";
|
Welcome Guest, Not a member yet? Register Sign In |