From b903a2db02a8fa76f075b52acb25d860ea537f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Fri, 2 Feb 2024 15:59:36 +0100 Subject: [PATCH] fix redir from home to apex --- lib/router.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/router.php b/lib/router.php index 4a2891d..710c41c 100644 --- a/lib/router.php +++ b/lib/router.php @@ -38,8 +38,14 @@ function initRouter(): bool if ($needsRedirect) { + if(!empty($routerRequest["subdomain"])){ + $sub_domain = $routerRequest["subdomain"] . "."; + } + else{ + $sub_domain = ""; + } $redirectAddress = $routerConfig["protocol"] . - $routerRequest["subdomain"] . "." . + $sub_domain . $routerRequest["domain"] . "." . $routerRequest["tld"] . "/" . $routerRequest["page_name"];