From 765180e706b904ccc6c52266c2b396012feba1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 16 Jan 2024 21:33:08 +0100 Subject: [PATCH] test --- lib/routing.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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;