From e95b208af90cc386a7d8d1bcab426727cf4f0121 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 21 Sep 2022 22:42:33 +0200 Subject: Update time --- pages/api.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pages/api.php') diff --git a/pages/api.php b/pages/api.php index a1f13d9..1d83985 100644 --- a/pages/api.php +++ b/pages/api.php @@ -11,5 +11,7 @@ $toplevel = explode("/", $pagename)[1]; if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php")) { require_once $_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php"; } else { - header("Location: /?error=Endpoint not found: " . strip_tags($toplevel)) and die(); + header("HTTP/1.1 500 Internal Server Error"); + echo("Endpoint not found"); + die(); } \ No newline at end of file -- cgit