404 Redirect works in all Browser except IE
Permalink
I have a 404 Redirect setup as follows:
site_theme_paths.php
.htaccess
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
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
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
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
the internet explorer thing, is NOT including images, it has to be atleast 512 bytes of text, this includes comments in the source
Thanks. The text alone is 6K. You can check it in Firefox.
Neville
Neville
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
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)
<?php header("Location:http://www.mysite.com/error-pagename"...); exit; ?>
that way you make use of the basic pages but they show yours
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
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
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...
"... 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...
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