Forum Moderators: phranque
Make sure your destination 404 page has 404 File Not Found in the title. Se's will find that. I don't think there is much else you can do.
Unfortunately, some browsers will cache the original redirect. That's not a problem if the original request was to a static page. The caching, can lead to problems if the original request (that errored) was to a dynamically generated page. Users won't be able to get back to the original page that generated the error on some browsers without clearing the cache. The moral is, to make sure your 500 errors go somewhere besides the default 404 page.
I was told this is dangerous, because if it's picked up every time there's a 404 I could get zapped for duplicate content, because of the 302. Nothing's dynamically generated, so that's not a problem.
There is a simple solution. Relative URL's will return 404 errors.
When a full URL is used a 302 redirect is returned. The incorrect URL is replaced with the redirect URL
[31/Aug/2001:21:58:23 +1000] "GET /dir/doit HTTP/1.0" 302 223
[31/Aug/2001:21:58:24 +1000] "GET /missing.html HTTP/1.0" 200 713
When a relative URL is used a 404 error is returned. The incorrect URL remains and the error page is displayed
[31/Aug/2001:22:01:02 +1000] "GET /dir/doit HTTP/1.0" 404 713
Images will be broken for 404 relative URL's. This can be fixed by using full URL's for images in the error page.