Error pages DO NOT work... (eg for 404 errors)


the wiki says name a file missing.html and put it in the root of your server. ( i did that but it still doesn’t work. i tried the actual root, and i tried inside my folder. little help?


They work for me (missing.html and forbidden.html). They’re in my folder.

Do you have some sort of mod_rewrite set up? If you go to does it show up?


#3 works
no mod_rewrite is set up


Do you have a .htaccess file? If so, what’s in it? If not, how 'bout posting a link of for something like



nope, no htaccess. and i tried this both with my and with my


looked in my error log and it says repeatedly:
[Sat May 6 04:25:08 2006] [error] [client] File does not exist: /home/bashsof/


I was not able to get but it did redirect me to your homepage. Did you change something?



what you got was missing.html. it’s the redirect. put in an actual bad url and you get no error page besides the “page cannot be displayed” thing.


In that case, it’s working. I tried and got the redirect. This worked both in curl and Safari.



Maybe you just need to clear the cache in your browser.


foo.html works as a redirect here too.

however, and a known issue with the server is pcgi 404’s. eg, will not yield the redirect.


hmm, still doesn’t work in IE (actually Maxthon), but works in firefox. maybe my cache does need cleared or something.


Maybe your browser isn’t allowing a page to simply do a meta refresh. That said, you might try putting the tag where they’re supposed to go - in the head.

Or, you might try a php redirect

(You’ll have to use .htaccess to change the name of the missing.html file so it can have a .php extension.)


had someone else try it in IE. doesn’t work for them, either. and i even moved the refresh to the HEad section. guess i can try .htaccess…

tried htaccess. shouldn’t this work:
ErrorDocument 404 /missing.html

(it’s not)
neither is
ErrorDocument 404 missing.html


Friggin’ IE. It works for me in Safari, Camino, Firefox, OmniWeb, iCab, Opera, Mozilla, and curl.

It’d sure be interesting to find out why IE is goofing it up.

I’m also of the opinion that your redirect page should mention something about it being a 404 before the user gets whisked away to your homepage.



what’s weird is, it works in IE 7b but not IE 6. Try this:
ErrorDocument 404


hmm, i looked in the logs just now on an unrelated manner and noticed this:

Invalid error redirection directive: missing.html

what is invalid about my htaccess file? it looks right to me. tried both of these:
ErrorDocument 404 /missing.html
ErrorDocument 404 missing.html


You don’t need that in your .htaccess file. DreamHost’s configuration looks for missing.html by default.



If what you see in Internet Explorer is this:

[code]The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Please try the following:

If you typed the page address in the Address bar, make sure that it is spelled correctly.

Open the home page, and then look for links to the information you want.
Click the Back button to try another link.
Click Search to look for information on the Internet.

HTTP 404 - File not found
Internet Explorer[/code]Then the problem is that Windows is set to “show friendly HTTP error messages” and this means that if the response content is less than 512 bytes, the content will be ignored.

:cool: [color=#6600CC]Atropos[/color] |


[quote]Invalid error redirection directive: missing.html

what is invalid about my htaccess file? it looks right to me. tried both of these:
ErrorDocument 404 /missing.html
ErrorDocument 404 missing.html[/quote]
The documentation is relatively clear on whatis accepted:

Oh yeah, not to mention it even explains the problem with IE… might want to bookmark that site.

:cool: [color=#6600CC]Atropos[/color] |