404 Redirect works in all Browser except IE

Permalink
I have a 404 Redirect setup as follows:

site_theme_paths.php
$v = View::getInstance();
$v->setThemeByPath('/page_not_found', "Surfulater");


.htaccess
ErrorDocument 404 /page-not-found


and this works in Firefox, Opera and Chrome, however in IE8 I just get the usual IE 404 error page.

The site ishttp://www.surfulater.com

In IEwww.www.surfulater.com/page_not_found.php... displays correctly, howeverwww.www.surfulater.com/page_not_found... doesn't. I don't know if this is related to my problem.

Thanks,
Neville

nevf
 
nevf replied on at Permalink Reply
nevf
I got up this morning to check for any replies and noticed that the .htaccess entry was /page-not-found instead of /page_not_found

Thinking eureka that must be it, I updated it and there was no difference! IE8 still doesn't show the page.

Now I wonder why it ever worked in Firefox etc.

Neville
nevf replied on at Permalink Reply
nevf
I've done some research and found:

1) "404 files (pages) under 512 bytes are ignored by the IE5+ browser and replaced by Microsoft’s own error page."

2) "If the error doc returned is less than 512 bytes and "Show friendly HTTP error messages" is enabled, then IE will substitute it's own internal error doc."

If I disable "Show friendly HTTP error messages" my 404 page is displayed.

I saved the generated page as 404.html and set: ErrorDocument 404 /404.html
and enabled "Show friendly HTTP error messages" again and the 404.html page IS NOT displayed. It is over 6K.

So no reasonable solution found so far.

Is anyone else able to display 404 pages in IE8 with "Show friendly HTTP error messages" enabled?

Neville
Mnkras replied on at Permalink Reply
Mnkras
the internet explorer thing, is NOT including images, it has to be atleast 512 bytes of text, this includes comments in the source
nevf replied on at Permalink Reply
nevf
Thanks. The text alone is 6K. You can check it in Firefox.

Neville
Brainakazariua replied on at Permalink Reply
Brainakazariua
The problem you have lies in the fact that the url of the page you use is incorrect.

under the page properties you need to check the page path. this one differs from what you try to open.
because of concretes page having /page_not_found.php your page doesn't work.
see:http://www.surfulater.com/page-not-found1... (this one works in IE, atleast it did for me)

When making error pages you can best name them after the error. /404 or /403 aren't used in the concrete basic which makes those urls work fine and get no additional number behind it.

To make these defined basics modify the basic concrete pages.

In both the page_not_found.php & page_forbidden.php place the following code: (remove everything else in it since that's of no importance)



that way you make use of the basic pages but they show yours
nevf replied on at Permalink Reply
nevf
Thank you for your reply. My second post indicated that I noticed the "page-not-found" error and corrected it, however it made no difference.

I also mentioned in another post that I created a static /404.html page that is 6K of text and IE8 still refused to show that.

Neville
sebmel replied on at Permalink Reply
sebmel
Maybe helpful

"... I used the full address instead of just /404.html and now it works on IE. ..."
Source:http://www.webmasterworld.com/html/4084929.htm...

"... This thread suggests embedding a META redirect in the error message:http://stackoverflow.com/questions/1726860...ailure-reliably... ..."
Source:http://forums.htmlhelp.com/index.php?showtopic=13389...