On 07/10/10 15:06, Aaron Lewis wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
> I'm trying to configure apache like this: when pages were not found on
> server , it returns a document moved message (301 or 302) , rather than
> a 404 error.
>
> So i put those:
>
> ErrorDocument 404 /error.html
> Rediret 302 /error.html http://my.host/
>
> But still , it's a 404 error , additionally , a 302 Found error was
> encountered while trying to handle the request.
>
> Any ideas will appreciate , thanks !
from stock httpd.conf:
...
# Customizable error response (Apache style)
# these come in three flavors
#
# 1) plain text
#ErrorDocument 500 "The server made a boo boo.
# n.b. the (") marks it as text, it does not get output
#
# 2) local redirects
#ErrorDocument 404 /missing.html
# to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
# N.B.: You can redirect to a script or a document using
server-side-includes.
#
# 3) external redirects
#ErrorDocument 402 http://some.other_server.com/subscription_info.html
# N.B.: Many of the environment variables associated with the original
# request will *not* be available to such a script.
...
3) above seems to apply to you. Did you try it?
/Alexander