From f0be65875b0fbc0fcb087d5caf7f3ad0999dfcea Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 18 Oct 2012 09:35:23 +0200 Subject: Display an error page if a virtual path doesn't exist Give user feedback instead of bailing out with an empty HTTP response body. Signed-off-by: Lukas Fleischer --- web/html/index.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web/html/index.php') diff --git a/web/html/index.php b/web/html/index.php index 6ee23bc5..422c0e53 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -102,5 +102,9 @@ if (isset($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { header("Content-Type: image/png"); include "./$path"; break; + default: + header("HTTP/1.0 404 Not Found"); + include "./404.php"; + break; } } -- cgit v1.2.3-24-g4f1b