Date: 2011oct15
OS: Linux
Product: Apache
Q. Apache: good and simple missing page
A. Add this directive to your httpd.conf file:
ErrorDocument 404 /404.cgi
Or it can be done individually for virtual hosts.
Create the 404.cgi file that is mentioned:
#!/usr/bin/perl
print <<EOF
Content-type: text/html
Status: $ENV{REDIRECT_STATUS} Condition Intercepted
<head>
<title>404 Not Found</title>
<link rel=stylesheet href=/css/mysheet.css type=text/css>
</head>
<h1>Page not found</h1>
<p>
Sorry page $ENV{REDIRECT_URL} doesn't exist any more.
<p>
There is other good stuff on the <a href=.>home page</a>
EOF
Make 404.cgi executable.
Restart Apache.