diff --git a/lib/routing.php b/lib/routing.php index cdbb1bb..8e836b7 100644 --- a/lib/routing.php +++ b/lib/routing.php @@ -32,9 +32,13 @@ function initRouter(){ } if ($needsRedirect) { - $redirectAddress = implode('.', $routerRequest["requestAddress"]); + $redirectAddress = $routerConfig["protocol"] . + $routerRequest["subdomain"] . "." . + $routerRequest["domain"] . "." . + $routerRequest["tld"] . "/" . + $routerRequest["page_name"]; // Redirect with default page name - header("Location: " . $routerConfig["protocol"] . $redirectAddress . "/" . $routerRequest["page_name"]); + header("Location: $redirectAddress"); } return !$needsRedirect;