404 Error Page - Not Working


#1

Hello all,

I implemented the missing.html page in my root directory per the WIKI page but this doesn’t seem to work. If you type in an incorrect URL I am getting a ‘cannot download file’ error in IE and Firefox. Am I missing something in my HTACCESS file?

Does this take some time to start working or did I do something wrong?

Thanks

-Dano


#2

You probably have an .htaccess file with conflicting directives. The missing.html should work without an .htaccess file.

  1. Browse directly to missing.html - eg http://example.com/missing.html
  • Your custom error page should show up properly.
  1. Delete the .htaccess file and browse to non-existent URL - eg http://example.com/notfound
  • Your custom error page should show up properly.
  1. Is missing.html actually PHP code?

  2. Are you using a different encoding other than Latin, i.e. language other than English?

:cool: openvein.org -//- One-time [color=#6600CC]$50.00 discount[/color] on [color=#0000CC]DreamHost[/color] plans: Use ATROPOS7


#3

Thanks for the help Atropos7!

I have discovered a few things:

-I can browse to the missing.html page in either browser and it works.

-I deleted the following from my htaccess file:
“AddType text/x-server-parsed-html .html” and the 404 started working.

-I went to dinner and when I came back it only works in Firefox, not IE. Huh? Must be a browser setting?

-I deleted the .htaccess file as you suggested and same as above (Firefox OK, IE No).

-No PHP code on the site.

-No different languages on the site.

I’m still poking at things but if you have any suggestions let me know.

-Dano


#4

[quote]-I deleted the following from my htaccess file:
“AddType text/x-server-parsed-html .html” and the 404 started working.[/quote]
Using a different media type for server-side includes isn’t necessary. I can’t find an explanation for doing so - this must be one of those things that is host-specific. There is no suggestion in the Apache HTTP Server documentation to do so at least. I can only assume a previous host might have web server software that actually changed the media type back to text/html after parsing.

Do you have any directives that set the Content-Disposition header? For example, setting it to “attachment” will cause browsers to prompt to download the file.

Try killing all IE Windows clearing your cache.

In addition use a service like http://web-sniffer.net/ to check the response headers. I suggest comparing them to a web site that works if you don’t feel like posting them here.

:cool: openvein.org -//- One-time [color=#6600CC]$50.00 discount[/color] on [color=#0000CC]DreamHost[/color] plans: Use ATROPOS7


#5

-I have been using different file extentions for server-side includes per Dreamhost (or so my buddy tells me). I implmented them during our migration to Dreamhost and they have been working so I didn’t question it. Just checked and I don’t need to change the file extensions, I’ll fix that later.

-Here are the headers off a regular page:

I got this from a template so I if you see something crazy let me know.

I cleared my caches and IE still won’t use the missing.html but Firefox does.

I used the sniff website you suggested, here is the response:

HTTP Request Header

Connect to 208.113.182.37 on port 80 … ok

GET / HTTP/1.1[CRLF]
Host: www.scooterlounge.com[CRLF]
Connection: close[CRLF]
Accept-Encoding: gzip[CRLF]
Accept: text/xml,application/xml,application/xhtml xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5[CRLF]
Accept-Language: en-us,en;q=0.5[CRLF]
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7[CRLF]
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9 Web-Sniffer/1.0.24[CRLF]
Referer: http://web-sniffer.net/[CRLF]
[CRLF]

Read timeout.

HTTP Response Header
Name Value Delim
HTTP Status Code: HTTP/1.1 200 OK

Feel free to check the url: www.scooterlounge.com.

Cheers and thanks for your help.

-Dano


#6

The Web Sniffer site appears to be experiencing network problems. Actually I couldn’t access http://www.sitepoint.com/ either today.

Anyways another way to check response headers is to use a browser plug-in. LiveHTTPHeaders for Firefox shows the following for http://www.scooterlounge.com/notfound -

HTTP/1.x 404 Not Found Date: Thu, 22 Nov 2007 18:56:40 GMT Server: Apache/2.0.54 (Unix) PHP/4.4.7 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2 Last-Modified: Thu, 22 Nov 2007 02:40:35 GMT Etag: "37e3a33-31c-6c290ec0" Accept-Ranges: bytes Content-Length: 796 Vary: Accept-Encoding Keep-Alive: timeout=2, max=100 Connection: Keep-Alive Content-Type: text/html Nothing looks out of the ordinary. Loading that URL in IE 7 gives positive results, as well as browsing to http://www.scooterlounge.com/missing.html

Are you still experience the problem in IE ?

:cool: openvein.org -//- One-time [color=#6600CC]$50.00 discount[/color] on [color=#0000CC]DreamHost[/color] plans: Use ATROPOS7


#7

Hmm…so it’s working for you?

I’m still seeing the problem with IE and Firefox works fine.

Thanks for your help. Hope you have a good Turkey Day (if you’re in the US!)

_Dano