From: Mischa POSLAWSKY Date: Sun, 29 May 2022 13:44:25 +0000 (+0200) Subject: sc: redirect subpage aliases to absolute paths X-Git-Tag: v1.13~3 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/637b74fc466ac1c3ee5471772d67364cec0c2792 sc: redirect subpage aliases to absolute paths Fix root request without trailing slash. --- diff --git a/sc.plp b/sc.plp index b3c27fc..fc9506a 100644 --- a/sc.plp +++ b/sc.plp @@ -29,7 +29,7 @@ my $requestver = $scvers{$Request ||= 'index'} or Html(), Abort("Requested version $Request not available", '404 request not found'); if (ref $requestver ne 'HASH') { - $header{Location} = $requestver; + $header{Location} = "/sc/$requestver"; Abort("Canonical URL for $Request is at $requestver", '302 subpage alias'); }