• My web host (Yahoo!) requires that if I want to have a custom 404 page, it must be saved in my root directory as e404.html. While I can run PHP in HTML files, I’m not quite sure how to generate a file to place there.

    How would I go about doing this? Since there isn’t a static WordPress 404 file, I can’t simply copy and paste it to the root directory.

    I was thinking that I could send 404 headers (so that search engines would know that the file wasn’t there), and then direct the traffic/spider to the WordPress 404 file… but since there’s no static 404 page, I haven’t the slightest as to where I could redirect the traffic to. Any thoughts?

    EDIT: Quick update, you can see my site at bundyxc.com, so that you can see what I’m talking about with the dumb Yahoo! error pages.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You have something that broke here too -> http://bundyxc.com/?p=500 and end comment below tags.

    But… you cannot have 404 WP custom page? I mean, I think you don’t need to have a 404 page in Yahoo, WordPress provides how to make one to your WP installation (just a 404.php page).

    If you want the Yahoo! one, just call e404.html from 404.php with
    <script>window.location.href=’compelteroute/e404.html’;</script>

    Thread Starter bundyxc

    (@bundyxc)

    See, I tried just putting in a random post ID (like you did), and that’s what came up. I just assumed that was normal WP behavior. I’ll post another thread trying to get a fix.

    If I don’t put anything in e404.html, then Yahoo! just uses their default 404 error page.

    WordPress provides how to make one to your WP installation (just a 404.php page)

    What do you mean by this? There’s an option to make a 404.php page? How would I do that?

    In a e404.html file in root, you can use redirect code:

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
    <html><head>
    <title>Error Redirect</title>
    <meta http-equiv=”REFRESH” content=”0;url=http://mydomain.com/error/”></head>
    <body></body></html>

    to go to a static wordpress page titled “error” and with that you can use whatever text you want in a theme styled page. Exclude that static page from navigation, or it will show up in your menus.

    Your theme has a 404.php file, and you could redirect to that, and that will give you a theme styled 404, but you may run into redirect loops in some instances.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘404 Page as e404.html’ is closed to new replies.