public function redirect($controller, $action = '') { if (UtilFunctions::startsWith($controller, "http") || UtilFunctions::startsWith($controller, "www")) { header('Location: ' . $controller); } else { header('Location: ' . HOSTNAME . $controller . ($action != "" ? "/" . $action : "")); } die; }