WordPress.org

Forums

[resolved] Custom 404 pages not working with IE8 (5 posts)

  1. chadrew
    Member
    Posted 4 years ago #

    Hello,
    I use a modified "Shape" theme for my WordPress. It has a custom 404.php page in its folder. I wrote some stuff there, like "sorry page wasn't found, you can try searching" and placed a search box so it would look nicer than an ugly default 404 page that browsers show.

    Here's the problem though. In Firefox and Chrome the custom 404 page displays just fine. But IE8 insists of showing its own default error page instead (the "The webpage cannot be found" one).

    I checked the site headers and it sends a status code "HTTP/1.1 404 Not Found" properly.

    Here's a really weird thing though. When I attempt to open a non-existing URL I made up in IE8, maybe 9 out of 10 times it displays the default 404 page. But once in a while it shows my custom WordPress 404 error page. It's completely random!

    Any ideas what could cause this?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    But IE8 insists of showing its own default error page instead (the "The webpage cannot be found" one).

    You need to reconfigure your copy of IE8 so that it doesn't show it's internal 404 page.

  3. chadrew
    Member
    Posted 4 years ago #

    Alright. It seems that Tools > Internet Options > Advanced > Show friendly HTTP error messages (uncheck) did the trick.

    I wonder if that's the default option for IE8 - if yes then it's a shame.

    Still no idea why sometimes WordPress 404 page would "manage" to load on IE8.

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    I wonder if that's the default option for IE8

    As far as I am aware, it still is. :-/

  5. chadrew
    Member
    Posted 4 years ago #

    Thanks for the help.

    For the record, I tried adding:

    ErrorDocument 404 /index.php?error=404

    to my .htaccess, but it didn't have any effect on IE's behaviour.

Topic Closed

This topic has been closed to new replies.

About this Topic