dcsimg

Zez.org: How to make 404 messages friendlier with Apache


[ Thanks to Paul K Egell-Johnsen for this link. ]

"The first thing you should do is configure Apache to serve a customized 404 document. This is done either in the server configuration, the virtual host, PR directory or in the .htaccess file. What you need to do is add the following directive into the selected configuration:" The first thing you should do is configure Apache to serve a customized 404 document. This is done either in the server configuration, the virtual host, PR directory or in the .htaccess file.

"ErrorDocument 404 URL"

"The URL can be "http://somehost.somewhere.com/", "/path/to/document.html", "/path/to/script.php" or "Plain text". You should use a path, since the error code will be propagated to the client, whomever that might be. If you use an URL a redirect will be sent, and that isn't the message you would like to send people."

This article was originally published on Nov 21, 2000
Page 1 of 1

Thanks for your registration, follow us on our social networks to keep up-to-date