From bd679bc2f4449fb2b63b1322993c0276b3c2f44f Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 22 Aug 2022 11:22:11 +0200 Subject: [PATCH] Do not assume script is installed in root dir --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 4d323a0..57bdb63 100755 --- a/index.php +++ b/index.php @@ -20,7 +20,7 @@ class CONFIG public static function SITE_URL() : string { $proto = ($_SERVER['HTTPS'] ?? 'off') == 'on' ? 'https' : 'http'; - return "$proto://{$_SERVER['HTTP_HOST']}/"; + return "$proto://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; } };