In my .htaccess
I have
ErrorDocument 404 http://foo.com/404.html
It works, in the sense that I recover from any file not found error and show the 404 page instead, but the way it works is to redirect the erroneous URI using a 301 to my 404.html
page.
This is bad because search engines and crawlers will not end up seeing a 404 code, rather a 301 code and will not purge deleted pages from their indices.
Can I make Apache serve up the contents of this 404 page upon file not found errors, yet still return a 404 code instead of the 301?
Best Answer
You should try to use absolute or relative path and not an URL
My apache2.conf :