Hi have created a error.php for joomla to redirect 404 errors etc to a joomla article. The code below works for a 404 error, but a 403 returns a blank page. I can navigate to the page directly outside my script so it must be either my code or how it is interactive in it's environment.
Thanks Stephen
defined( '_JEXEC' ) or die( 'Restricted access' );
if ($this->error->code == 404)
{
Header( "HTTP/1.1 404 Not found" );
header("Location: http://www.queensberry.com/misc/filenotfound/");
} else if ($this->error->code == 403) {
Header( "HTTP/1.1 403 Restricted Content" );
Header( "Location: http://www.queensberry.com/restrictedcontent/" );
} else {
echo "hello world error code = " . $this->error->code;
}
?>