From ce54c0c57e9b32a56d24699a3a870fef4b25ddb7 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 12 Aug 2018 18:00:53 +0200 Subject: [PATCH] page: strip html suffix from symlink redirects --- page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page.php b/page.php index 0707426..8979e62 100644 --- 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; -- 2.30.0