----- Original Message ----- From: "Gene Grimm" <[EMAIL PROTECTED]> To: "Leonardo Boselli" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: 14 July, 2003 10:36 AM Subject: Re: Default Apache 404 for all sites
> Leonardo Boselli wrote: > > I was told to set a script in php or perl that looks if in the directory where > > the called poage were an 404.php or 404.html file, if so include that, > > otherwise go up a level and try again, if one reach the home of the > > domain and does not find any 404 then use the default one ... > > if you coded the script please send it to me . > > > What I've done is this, and it seems to work for me: > > Alias /errors/ /usr/share/apache/errors/ > ErrorDocument 400 /errors/error.php > ErrorDocument 401 /errors/error.php > ErrorDocument 403 /errors/error.php > ErrorDocument 404 /errors/error.php > ErrorDocument 408 /errors/error.php > ErrorDocument 500 /errors/error.php > > It's a PHP script that reads the error code and displays a generically > formatted error message for all sites on my server. > Indeed, this was the solution I was looking for!!! I tested it, and confirm it works by default on all sites (when you put it above all Virtualhosts), and the user can override it by making their own .htaccess file. Much appreciated! Jas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]