From: Mischa POSLAWSKY Date: Sun, 12 Aug 2018 16:00:53 +0000 (+0200) Subject: page: strip html suffix from symlink redirects X-Git-Tag: v3.7~25 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/ce54c0c57e9b32a56d24699a3a870fef4b25ddb7 page: strip html suffix from symlink redirects --- 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;