diff --git a/smart_build.php b/smart_build.php index 56299aee..d8352621 100644 --- a/smart_build.php +++ b/smart_build.php @@ -124,6 +124,7 @@ $entrypoints['/%b/catalog.html'] = 'sb_catalog'; $reached = false; $request = $_SERVER['REQUEST_URI']; +list($request) = explode('?', $request); foreach ($entrypoints as $id => $fun) { $id = '@^' . preg_quote($id, '@') . '$@u'; @@ -145,13 +146,14 @@ foreach ($entrypoints as $id => $fun) { function die_404() { global $config; if (!$config['page_404']) { - header("HTTP/1.1 404 Not Exists"); - header("Status: 404 Not Exists"); - echo "

404 Not Exists

Page doesn't exist


vichan
"; + header("HTTP/1.1 404 Not Found"); + header("Status: 404 Not Found"); + echo "

404 Not Found

Page doesn't exist


vichan
"; } else { header("Location: ".$config['page_404']); } + die(); }