こんにちは、joomla の error.php を作成して、404 エラーなどを joomla の記事にリダイレクトしました。以下のコードは 404 エラーに対して機能しますが、403 は空白のページを返します。スクリプトの外部で直接ページに移動できるため、コードであるか、環境内でインタラクティブである必要があります。
ありがとうスティーブン
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;
}
?>