2 error_reporting(E_ALL);
3 ini_set('display_errors', TRUE);
6 $Page = preg_replace('/\?.*/', '', $_SERVER['REQUEST_URI']);
7 $Page = urldecode(trim($Page, '/')) ?: 'index';
9 if (file_exists("$Page/index.html")) {
13 if (file_exists("$Page.html")) {
16 if (file_exists("$Page.php")) {
17 # unformatted script override
22 $up = strrpos($Page, '/');
24 http_response_code(404);
28 $Args = substr($Page, $up) . $Args;
29 $Page = substr($Page, 0, $up);
32 include 'head.inc.php';