Forum Moderators: open

Message Too Old, No Replies

problem with 404 redirect.

         

mike2010

7:05 pm on Feb 22, 2010 (gmt 0)

10+ Year Member



This has been broken for about a year...and I just finally realized it today. (since I only use FireFox as my browser)

my 404 redirect works fine with FireFox but not with IE. With IE, I still get the "error 404 page not found" error when trying to access an incorrectly typed page on the server. (currently only have Internet Explorer version 8.0 on the PC )

I have my local .htaccess as the following :

ErrorDocument 400 /404.html
ErrorDocument 401 /404.html
ErrorDocument 403 /404.html
ErrorDocument 404 /404.html



And my 404.html file as :

<html> <head> <title></title>
<META http-equiv="refresh" content="0;URL=http://www.mysite.com"> </head></html>


maybe a certain " tag is missing or not recognized correctly with IE as it is with FireFox ?

Any help is much appreciated.

mike2010

7:08 pm on Feb 22, 2010 (gmt 0)

10+ Year Member



lol.. I just fixed my own problem within 3 minutes.

I used the full address instead of just /404.html and now it works on IE.

silly IE...always making things more difficult.

rocknbil

9:48 pm on Feb 22, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



(May be remembering this incorrectly . . . )

Long long time ago, maybe it still exists, IE used to have a problem with 404's that if the file size of the 404 was too small, it may not serve properly. I remember having to "fluff up" the 404 page to get it to work in IE.

But this is a bad idea, really:

<META http-equiv="refresh" content="0;URL=http://www.mysite.com"> </head></html>

For one, it gives the user no indication of what's going on. I click a link to widgets and brings me to the main page="your site is broken."

Your 404 should provide meaningful assistance to the user, as well as a link or form to notify you if they think this is in error. Sites grow so large often a single link gets overlooked, and this can help avoid these.

One idea of "meaningful assistance" would be "this page or item no longer exists. You may search our site below or visit other areas . . . " with a search form for your site.

claus

10:04 pm on Feb 22, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree with rocknbil.

A 404 page should definitely display a 404 message. Even the number "404" should be on it, really.

However, you can easily include a link to your home page on the 404 page. Nothing wrong with that.

If you really want the META Refresh, then set it to 30 seconds or so, not lower. Then write a message on the page that "We could not find anything to display on the address you wanted. You will be redirected to the home page shortly." ... or something like that.

penders

12:49 pm on Feb 24, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Long long time ago, maybe it still exists, IE used to have a problem with 404's that if the file size of the 404 was too small, it may not serve properly. I remember having to "fluff up" the 404 page to get it to work in IE.


Yes - I think this is still relevant. Not just 404's. If the error doc returned is less than 512 bytes and "Show friendly HTTP error messages" is enabled (it is disabled in my IE8 - but I'm not sure that is the default), then IE will substitute it's own internal error doc. In such cases it was/is usual to just 'fluff up' the doc with an HTML comment to push it over the 512 bytes.