page: override request by given script path
[minimedit.git] / page.php
index 6623c8b39c2281de2038d4dc6ae7e43df58992db..21cc0a06783982d838210aeabeadb1c1d7bb21d8 100644 (file)
--- a/page.php
+++ b/page.php
@@ -56,7 +56,7 @@ $Edit = isset($_GET['edit']);
 # distinguish subpage Args from topmost Page script
 
 $Args = '';
-$Page = preg_replace('/\?.*/', '', $_SERVER['REQUEST_URI']);
+$Page = preg_replace('/\?.*/', '', @$_SERVER['PATH_INFO'] ?: $_SERVER['REQUEST_URI']);
 $Page = urldecode(trim($Page, '/')) ?: 'index';
 while (TRUE) {
        if (file_exists("$Page/.private")) {