WordPress.org

Ready to get started?Download WordPress

Forums

Custom Error Documents / 404 (3 posts)

  1. Xenomorph
    Member
    Posted 8 years ago #

    Ok, I've read several posts now regarding 404 errors.

    I never had any issue with my web hosts over the years.
    I never had any issue with .htaccess or Apache.
    I never had any issue with making custom Error Documents.
    I had working 400, 401, 403, 404, and 500 ErrorDocuments.

    However, since upgrading from WordPress 1.5.x to 2.x, they have all stopped working.

    A lot of the posts where people have 404 issues seem to have nothing to do with my problem. They always trace it back to a flaky host, some htaccess issue, etc.

    Even if my htaccess file contains ONLY the ErrorDocument rewrite and the WordPress Permalink rewrites, I can still never get an error doc to load. Every bad request just loads /index.php, instead of my errordocs (/error_docs/404.php for example).

    It's been this way with 2.0/2.0.1/2.0.2 now. Does anyone know if this has been addressed with any nightly build?

  2. Xenomorph
    Member
    Posted 8 years ago #

    This is driving me nuts. There are a dozen+ 404 pages now where things aren't working right for them.

    It's not an issue with FastCGI, it's not an issue with my .htaccess file, it's not an issue with my OS.

    404s were working with WordPress 1.5.x, but not with 2.x.

    Every invalid page I try to load up just brings up /index.php. Nothing i can do (other than removing the WordPress entry in .htaccess, but then nothing works) makes my 404 page load up.

  3. Xenomorph
    Member
    Posted 8 years ago #

    ok, i got stuff working.

    i noticed the default WordPress template uses "is_404()" ... so i figured out how to use it with my page.

    since WordPress has /index.php handle everything, i ended up adding this to it:

    if (is_404())
    {
    require("/path/to/404.php");
    exit;
    }

    i'm sorry if that was in the docs some place, but i didnt see it anywhere that you had to add "is_404" to your page.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags