Chalk this up to yet another reason to hate on Internet Explorer. IE 8 has at least three points of failure for your custom error pages. It will display its own error pages instead of yours if:

  • Your error page is under 512 bytes
  • The user has “friendly HTTP error messages turned off.” Some claim this is the default setting, it wasn’t in my installation.
  • Internet Explorer just doesn’t feel like showing it. No, seriously. Sometimes it works, sometimes it doesn’t with the exact same setup.

Thanks to WPCanada, I was able to force the browser to recognize my custom 404 page by adding this code to the very top of 404.php:

<?php ob_start(); ?>
<?php header("HTTP/1.1 404 Not Found"); ?>
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>