page: http redirect to html symlinks
[minimedit.git] / 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";