From: Mischa POSLAWSKY Date: Tue, 31 Jul 2018 18:17:20 +0000 (+0200) Subject: page: http redirect to html symlinks X-Git-Tag: v3.6~9 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/650a63a68456eee4dad31170e2660319a82c905d page: http redirect to html symlinks Feature to set up shorthands and replacements. --- diff --git a/page.php b/page.php index e83a585..0707426 100644 --- 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";