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
(parent:
27bc06f
)
page: http redirect to html symlinks
author
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 31 Jul 2018 18:17:20 +0000
(20:17 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 10 Aug 2018 23:27:44 +0000
(
01:27
+0200)
Feature to set up shorthands and replacements.
page.php
patch
|
blob
|
history
diff --git
a/page.php
b/page.php
index e83a5853f355b25579fc1e2e208673be225e8674..070742643481a29ad0a818a6173841e690b7fdfd 100644
(file)
--- a/
page.php
+++ b/
page.php
@@
-136,6
+136,12
@@
while (TRUE) {
$staticpage = NULL;
if (file_exists("$Page$Args.html")) {
$staticpage = "$Page$Args.html";
+ if (is_link($staticpage)) {
+ $target = readlink($staticpage);
+ header("HTTP/1.1 302 Shorthand");
+ header("Location: $target");
+ exit;
+ }
}
elseif (file_exists("$Page$Args/index.html")) {
$staticpage = "$Page$Args/index.html";