diff --git a/index.php b/index.php index 5d118b8..1019000 100644 --- a/index.php +++ b/index.php @@ -14,6 +14,11 @@ $dynamic_page_dir = "dynamic/"; $subdomain = basename(explode('.', $_SERVER['HTTP_HOST'])[0]); $page_name = basename($_SERVER["QUERY_STRING"]);; +if(empty($page_name)){ + $page_name = "index"; +} + + $srvname = $_SERVER["SERVER_NAME"]; $dynamic_page_file = $page_dir . $subdomain . "/" . $page_name . ".php"; @@ -22,8 +27,6 @@ $page_file = $page_dir . $subdomain . "/" . $page_name . ".html"; $dynamic_page_file_global = $page_dir . "global/" . $page_name . ".php"; $page_file_global = $page_dir . "global/" . $page_name . ".html"; -echo $page_file; - $skeleton = file_get_contents($template_dir . "skeleton.html"); $nav = file_get_contents($template_dir . "nav.html");