From 03508f2470c3520b64f8b7bb60fad27f3b5c7238 Mon Sep 17 00:00:00 2001 From: "codeberg.org" Date: Mon, 4 May 2020 23:47:35 +0200 Subject: [PATCH] var/www/pages/index.php : improve look of URLs --- var/www/pages/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/www/pages/index.php b/var/www/pages/index.php index 6f7d1f7..704d9a0 100644 --- a/var/www/pages/index.php +++ b/var/www/pages/index.php @@ -51,7 +51,7 @@ $command = "sh -c \"cd '$git_root' && /usr/bin/git ls-tree 'master:$file_url' > exec($command, $output, $retval); if ($retval === 0) { if (substr($request_url, -1) !== "/") { - $h = "Location: https://" . $_SERVER["HTTP_HOST"] . "/" . $owner . "/" . $file_url . "/"; + $h = "Location: $request_url/"; if ($_SERVER['QUERY_STRING'] !== "") $h .= "?" . $_SERVER['QUERY_STRING']; header($h);