From 650a63a68456eee4dad31170e2660319a82c905d Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 31 Jul 2018 20:17:20 +0200 Subject: [PATCH] page: http redirect to html symlinks Feature to set up shorthands and replacements. --- page.php | 6 ++++++ 1 file changed, 6 insertions(+) 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"; -- 2.30.0