Custom 404 error message in Apache

Custom 404 error message in Apache

Post by Mark Stabe » Wed, 28 Jan 1998 04:00:00



I'm using the ErrorDocument directive to provide a custom 404 error page.
However one drawback is that users can no longer see the faulty url they
requested.

Is there a way to include the default "The requested URL /foo.html was not
found on this server." behavior in a custom error document?

Mark Staben

 
 
 

Custom 404 error message in Apache

Post by Marc Slemk » Wed, 28 Jan 1998 04:00:00



Quote:>I'm using the ErrorDocument directive to provide a custom 404 error page.
>However one drawback is that users can no longer see the faulty url they
>requested.

That depends how you call it.  If you use a full URL like
http://site/path/notfound.html then it is that way but it isn't if
you use something like /path/notfound.html

Quote:>Is there a way to include the default "The requested URL /foo.html was not
>found on this server." behavior in a custom error document?

Sure, but only if you don't use the full URL in which case the user
normally (depending on their client) sees the one that caused the
404 anyway.  To see all the environment variables you can use
(either in a SSI or a CGI), setup a 404 to redirect to the printenv
script.

 
 
 

Custom 404 error message in Apache

Post by Kurt J. Lanz » Wed, 28 Jan 1998 04:00:00



> I'm using the ErrorDocument directive to provide a custom 404 error page.
> However one drawback is that users can no longer see the faulty url they
> requested.

> Is there a way to include the default "The requested URL /foo.html was not
> found on this server." behavior in a custom error document?

The URL ought ot be in one of your environment variables. If it were me
(on a unix system) I would code my 404 CGI to do an "env" and look at
it.
--
Kurt J. Lanza

 
 
 

1. Error 404 and other custom messages.

We are using Apache 1.0.3 and would like to know how to set up a
custom error message to be displayed when the error 404, 401 and 500
occur. I have seen this done but do not know how to do it.

We are a domain on a multi-domain server. So the messages would have
to be ones that do not affect the other domains.

www.windows95.com is an example of custom message. He is housed on an
Identical system.

Thanks for any help in advance!

David Bernard
Webmaster - "The Delphi Information Connection"

http://www.delphi32.com

2. mouses and xfree

3. Apache 1.3.14: Sporadic 403 and 404 error messages

4. Free Security Product Directory

5. IE 5.5 doesn't recognize custom 404 message

6. Fix for drivers/pnp/interface.c

7. Setup Custom 404 Error page

8. HP Laptop Install Woes

9. Website not found error message 404

10. IE5 intercepts 404 Error Message

11. Apache: perlscript to handle 404 errors (included)

12. Apache 1.2b7, PATH_INFO with "%2f" - error 404

13. <apache> where does the 404 error get the URL?