= 2){ header('Location: '.$url); die(); }; if ($endpoints[0] == "") $endpoints[0] = "home"; if ($endpoints[0] == "contactform"){ include_once("controller/contactform.php"); return; }; if (count($endpoints) == 1){ if (! file_exists("view/$endpoints[0].php")) $endpoints = array("404"); }; include_once("layout/header.php"); //include_once("layout/nav.php"); include_once("view/$endpoints[0].php"); include_once("layout/footer.php"); ?>