From 907a42ff7ec19c1a7993e7bd97d6521a37b948fc Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Wed, 28 Dec 2022 19:56:26 +0100 Subject: [PATCH] Remove index.php references --- common_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common_config.php b/common_config.php index 705028b..007dc6d 100644 --- a/common_config.php +++ b/common_config.php @@ -186,7 +186,7 @@ function alt_links(): void continue; } $canonical_query['lang'] = $lang; - $link = CANONICAL_URL . $_SERVER['SCRIPT_NAME'] . '?' . http_build_query($canonical_query); + $link = CANONICAL_URL . ($_SERVER['SCRIPT_NAME'] === '/index.php' ? '/' : $_SERVER['SCRIPT_NAME']) . '?' . http_build_query($canonical_query); echo ''; } }