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

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

Posted by: gnznroses
Posted on: 2006-05-06 16:30:00

the wiki says name a file missing.html and put it in the root of your server. (http://wiki.dreamhost.com/index.php/Creating_custom_error_pages) i did that but it still doesn't work. i tried the actual root, and i tried inside my domain.com folder. little help?

Edited by gnznroses on 05/06/06 04:32 PM (server time).

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: sdayman
Posted on: 2006-05-06 16:44:00

They work for me (missing.html and forbidden.html). They're in my domain.com folder.

Do you have some sort of mod_rewrite set up? If you go to yoursite.com/missing.html does it show up?

-Scott

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: gnznroses
Posted on: 2006-05-06 16:50:00

domain.com/missing.html works
no mod_rewrite is set up

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: sdayman
Posted on: 2006-05-06 17:40:00

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

-Scott

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: gnznroses
Posted on: 2006-05-06 19:17:00

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

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: gnznroses
Posted on: 2006-05-06 19:32:00

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

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: sdayman
Posted on: 2006-05-06 20:18:00

I was not able to get bashsoftware.net/missing.html but it did redirect me to your homepage. Did you change something?

-Scott

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: gnznroses
Posted on: 2006-05-06 20:50:00

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.

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: sdayman
Posted on: 2006-05-06 22:05:00

In that case, it's working. I tried bashsoftware.net/foo.html and got the redirect. This worked both in curl and Safari.

-Scott

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: silkrooster
Posted on: 2006-05-06 23:05:00

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

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: snokarver
Posted on: 2006-05-06 23:59:00

foo.html works as a redirect here too.

however, and a known issue with the server is pcgi 404's. eg, http://bashsoftware.net/foobar.php will not yield the redirect.

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: gnznroses
Posted on: 2006-05-07 09:57:00

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

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: snokarver
Posted on: 2006-05-07 11:59:00

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
http://us3.php.net/header

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

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: gnznroses
Posted on: 2006-05-07 12:36:00

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....

-edit-
tried htaccess. shouldn't this work:
ErrorDocument 404 /missing.html

(it's not)
neither is
ErrorDocument 404 missing.htmlEdited by gnznroses on 05/07/06 12:48 PM (server time).

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: sdayman
Posted on: 2006-05-07 14:33:00

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.

-Scott

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: snokarver
Posted on: 2006-05-07 14:34:00

what's weird is, it works in IE 7b but not IE 6. Try this:
ErrorDocument 404 http://bashsoftware.net/missing.html

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: gnznroses
Posted on: 2006-08-13 15:50:00

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
Edited by gnznroses on 08/13/06 03:52 PM (server time).

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: sdayman
Posted on: 2006-08-13 16:01:00

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

-Scott

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: Atropos7
Posted on: 2006-08-13 16:47:00

In reply to:

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.


If what you see in Internet Explorer is this:

The page cannot be found 

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

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: Atropos7
Posted on: 2006-08-13 16:51:00

In reply to:

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


The documentation is relatively clear on whatis accepted:

http://httpd.apache.org/docs/1.3/mod/core.html#errordocument

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

cool Atropos | openvein.org

Re: error pages DO NOT work... (eg for 404 errors)

Posted by: gnznroses
Posted on: 2006-08-13 18:04:00

oh yeah, i remember now on my old host the error page was padded with a bunch of spaces. that must be why. thanks a lot.

Tags: wikidreamhostdomainphphtmlindexhelphttpcustom error