git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
eccaf81
)
page: strip html suffix from symlink redirects
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 12 Aug 2018 16:00:53 +0000
(18:00 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 17 Aug 2018 13:08:51 +0000
(15:08 +0200)
page.php
patch
|
blob
|
history
diff --git
a/page.php
b/page.php
index 070742643481a29ad0a818a6173841e690b7fdfd..8979e6298d0d7c7d45a961264af9ce5a84182685 100644
(file)
--- a/
page.php
+++ b/
page.php
@@
-137,7
+137,7
@@
$staticpage = NULL;
if (file_exists("$Page$Args.html")) {
$staticpage = "$Page$Args.html";
if (is_link($staticpage)) {
- $target =
readlink($staticpage
);
+ $target =
preg_replace('/\.html$/', '', readlink($staticpage)
);
header("HTTP/1.1 302 Shorthand");
header("Location: $target");
exit;