httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Cohen" <li...@gej-it.com>
Subject RE: [users@httpd] ErrorDocument just doesn't work (Apache2)
Date Sat, 12 Apr 2003 00:07:21 GMT
What you are doing here is making a loop to the error referral, when you
want to assign html page 404.html to error 404 you do as you did, but when
the server gets a 403 (or any other) and cannot find the error file or no
file has assigned to it, it won't give 404.html page, it will give the
browser default page which is what you get.
For instance if you want to get the 404.html page coming up when you do 403
error, you MUST assign error code 403 to that page, otherwise it will give
your browser's default page, so you must do: ErrorDocument 403 /404.html to
get the result you are looking for.

All the best,
Jeff Cohen

> -----Original Message-----
> From: Brian Akins [mailto:bakins@web.turner.com]
> Sent: Friday, April 11, 2003 1:27 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] ErrorDocument just doesn't work (Apache2)
> 
> I am running 2.0.45, with the following in the httpd.conf:
> 
> <Directory />
>     Options FollowSymLinks
>     AllowOverride None
> </Directory>
> 
> <Directory "/opt/apache/htdocs/">
>     Options Indexes FollowSymLinks Includes
>     AllowOverride None
> </Directory>
> 
> ErrorDocument 404 /404.html
> 
> 
> /opt/apache/htdocs/404.html exists and direct requests for it are fine.
> However, requests for host/bad_url always return the default apache 404
> error. All that is in the logs is
>  "File does not exist: /opt/apache/htdocs/bad_url".
> 
> 
> If I do something bad on purpose like setting:
> 
> ErrorDocument 404 /garbage.html
> 
> and /opt/apache/htdocs/garbage.html does not exists, request for
> host/bad_url get the exact same response as before, and the following is
> logged:
> 
> File does not exist: /opt/apache/htdocs/bad_url
> File does not exist: /opt/apache/htdocs/garbage.html
> 
> This should produce an error with "additionally...."
> 
> 
> No matter what I do, I cannot get ErrorDocument to work.  I'm I missing
> something?
> 
> --Brian
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message