[resolved] Template 404 file not working (7 posts)

  1. kmccoll
    Posted 10 years ago #

    Whenever I browse to a non-existent file, I get the standard apache 404 message instead of my own. Plus, interestingly, a message saying it failed with the custom 404. The exact message:

    Not Found
    The requested URL /123 was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I am not using structured permalinks, if that has any relevance (a restriction of my host).

    The site is http://ijamming.net if you want to see for yourselves.

    Any clues?

    Thanks all

  2. Alex Mills (Viper007Bond)
    Posted 10 years ago #

    Contrary to how it may seem, the 404.php file isn't for true 404's, it's for when no posts are found.

    Example: http://ijamming.net/index.php?s=foobar

    If you want it to truely be your 404 page, edit/create a .htaccess file and drop this in it:

    ErrorDocument 404 /wp-content/themes/ijammingnet/404.php

    That should do it. :)

  3. techwench
    Posted 10 years ago #

    Actually, you ought to use this instead of directly linking to the 404.php file:

    ErrorDocument 404 /index.php?error=404

  4. kmccoll
    Posted 10 years ago #

    Thanks guys - that's done the trick. Much happier now - cheers.

    Although... just fyi, my custom 404 does *not* appear for when a search doesn't find a post (my custom search page handles that) . Not important to me though.

  5. thaibagu
    Posted 9 years ago #

    I'm also encountering this problem. I've checked to ensure that each folder and file is in it's proper place, but I'm still receiving the error. Is there anything else that could cause it?


  6. thaibagu
    Posted 9 years ago #

    Sorry, I posted the question to the wrong place. Please disregard.

  7. Kalebeul
    Posted 9 years ago #

    The above solution failed for me, I think because there was another issue: MSIE apparently doesn't display 404 custom pages below 512 bytes. If for some strange reason--I for example am SSI-ing the pages in question--you want a tiny or blank 404, creating enough text to get above 512 and then commenting it out seems to work.

Topic Closed

This topic has been closed to new replies.

About this Topic