Forum Moderators: phranque
ErrorDocument 404 urltomyerrorpage
I felt pretty good about it until I read the following thread [webmasterworld.com ] where jdmorgan mentions that:
"There is a very large number of mis-configured servers on the Web, many of which will not generate a 404-Not Found response under *any* circumstances."
So I checked out the headers returned when I purposely seek out a 404 on my site. I get a 302 to redirect and then a 200 once I'm redirected to the custom page.
So I would like to know what my options are here. Am I trying to have my cake and eat it too? Did I just miss something in my configuration? Should I drop the idea of a custom error page? Should I not care about the fact that my webserver has infinte URLs? I'm tryting to figure out whether I'm trying to do the right thing in the first place, and if I am, how to implement it properly... Any suggestions?
Use ErrorDocument LocalURLPathToYourPage and *not* a full URL. Do not include "http://www.yourdomain.com/" in this path, otherwise the server will treat this as an external redirect and generate a 302 response code instead of the desired 404. This behaviour is documented in the Apache ErrorDocument description [httpd.apache.org].
Jim