regex in route.php |
[eluser]neph[/eluser]
i'm trying to figure out a way to set up a conditional for not equal to in the route.php file. $route['!=admin'] = 'home/index'; i have a pretty basic cms that is pulling the actual page markup/content from the database but i want the pages to show up without having to provide a controller name in the url, the only work around i've gotten so far is running a switch in my admin controller for each of those functions and setting a static route for it so www.site.com/pagename would do a $route[':any'] = "pages/view", works but it causes conflicts with my admin section. so..in short is there a way to do (:any if not equal to 'admin') as part of the regex in the route.php file?
[eluser]xwero[/eluser]
The easiest way to solve it is to put an admin route before all the others Code: $route['(admin)(.*)'] = '$1$2'; |
Welcome Guest, Not a member yet? Register Sign In |