Welcome Guest, Not a member yet? Register   Sign In
Routing to specific controller if class doesn't exist?
#2

[eluser]Unknown[/eluser]
I figured it out because of course as soon as I posted it I remembered the term for it haha!

Code:
$url_parts = explode('/',  strtolower($_SERVER['REQUEST_URI']));


$reserved_routes = array("club", "login", "profile", "welcome","home");
if (!in_array($url_parts[2], $reserved_routes)) {    
    $route['([a-zA-Z0-9_-]+)'] = "home/view/$1";
}


Messages In This Thread
Routing to specific controller if class doesn't exist? - by El Forum - 10-13-2013, 06:09 AM
Routing to specific controller if class doesn't exist? - by El Forum - 10-13-2013, 08:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB