...

View Full Version : Simulate HTTP error



knightcon
11-23-2007, 12:17 AM
I am writing software that needs to be able to recognize when HTTP error codes are received. I was wanting to know if it is possible with a .htaccess file or similar to force the webserver to send an error code instead of the requested page html.

Apostropartheid
11-23-2007, 05:28 PM
Easy in PHP.

<?php
header("HTTP/1.0 404 Not Found");
include("http://mysite.com/my404.php");
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum