PHP: if ($_SERVER['REQUEST_METHOD'] == 'GET') { header("HTTP/1.0 404 Not Found"); include('404.html'); die(); }