git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9425975
)
sc: redirect subpage aliases to absolute paths
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 29 May 2022 13:44:25 +0000
(15:44 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 1 Jun 2022 18:05:15 +0000
(20:05 +0200)
Fix root request without trailing slash.
sc.plp
patch
|
blob
|
history
diff --git
a/sc.plp
b/sc.plp
index b3c27fc6c8705c02786aa3bba48350b380af8e5f..fc9506a5c656564f30e07c7ebf9194c3e4a8cef3 100644
(file)
--- a/
sc.plp
+++ b/
sc.plp
@@
-29,7
+29,7
@@
my $requestver = $scvers{$Request ||= 'index'}
or Html(), Abort("Requested version <q>$Request</q> 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');
}