.htaccess Код: ErrorDocument 400 /error.php?q=400 ErrorDocument 401 /error.php?q=401 ErrorDocument 403 /error.php?q=403 ErrorDocument 404 /error.php?q=404 ErrorDocument 405 /error.php?q=405 ErrorDocument 408 /error.php?q=408 ErrorDocument 414 /error.php?q=414 ErrorDocument 500 /error.php?q=500 ErrorDocument 502 /error.php?q=502 ErrorDocument 504 /error.php?q=504 сам скрипт Код: <?php // @file error.php $error_msg = array(); if(isset($_GET["q"]) && is_numeric($_GET["q"])){ $status = array( 400 => array("400 Bad Request", "Your syntax is wack."), 401 => array("401 Login Error", "Please try again."), 403 => array("403 Forbidden", "This be private homey."), 404 => array("404 Missing", "Clearly this doesn't exist."), 405 => array("405 Method Not Allowed", "Method Not Allowed."), 408 => array("408 Request Timeout", "Upgrade your browser."), 414 => array("414 URL To Long", "Is that a URL in your pants?"), 500 => array("500 Internal Server Error", "AHHHhhh my server is down!"), 502 => array("502 Bad Gateway", "The server is acting all crazy."), 504 => array("504 Gateway Timeout", "I'm sorry, I'm afraid I can't do that."), ); $error_msg = $status[$_GET["q"]]; } if(!empty($error_msg)){ foreach ($error_msg as $err) echo $err."<br>"; }else{ echo "Something went wrong."; } ?>