diff --git a/lib/router.php b/lib/router.php index c408e96..97d49ea 100644 --- a/lib/router.php +++ b/lib/router.php @@ -17,10 +17,11 @@ function initRouter(): bool $routerRequest["tld"] = basename($routerRequest["requestAddress"][1]); } - $routerRequest["subdomain"] = basename($routerRequest["requestAddress"][0]); - $routerRequest["domain"] = basename($routerRequest["requestAddress"][1]); - $routerRequest["tld"] = basename($routerRequest["requestAddress"][2]); - + else { + $routerRequest["subdomain"] = basename($routerRequest["requestAddress"][0]); + $routerRequest["domain"] = basename($routerRequest["requestAddress"][1]); + $routerRequest["tld"] = basename($routerRequest["requestAddress"][2]); + } $routerRequest["page_name"] = basename($_SERVER["QUERY_STRING"]); if (empty($routerRequest["page_name"])) {