• The 404 page is not working for me. I have a 404 in my theme (including <?php get_header(); ?>)

    Even if I’m going to index.php?error=404, it results in getting the index.php instead of the customized error page. Also no 404 header is returned, just a 200 (ok).

    I’m working on Windows 2003, PHP5, WordPress 2.0.2.

    If somebody has any clues on where to look, please let me know.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter sleurink

    (@sleurink)

    I discovered it has to do with permalinks. When I turn this off, the 404 page is displayed. The question remains though why this occurs when permalink is turned on….

    Anyone??

    On Appache on Windows, permalinks may work the ordinary way, but if you are using IIS, the don’t.
    For some thought about tese issues see Using Permalinks

    I don’t think this is a Windows error. I’m running on FreeBSD and seeing the same behavior. As a workaround, I changed the ModRewrite line so that it only sends real links (rather than everything) to index.php, so at least people get Apache’s 404… but I’d much rather have WordPress handle the errors so that it can match the theme. This seems like a bug to me.

    I’m seeing the same error. When I have a custom permalink format turned on, I receive this error instead of my custom 404 page:


    Not Found

    The requested URL /cgi-bin/php/index.php was not found on this server.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    My server setup:
    —————-
    FreeBSD 5.4
    Apache 1.3.34
    PHP 4.4.2
    WordPress 2.0

    My .htaccess file:
    ——————
    #BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    #END WordPress
    ErrorDocument 404 /index.php?error=404

    My custom permalink structure:
    ——————————
    /%postname%.html

    And to see the error in action:
    ——————————-
    https://www.mikelee.org/404

    If I turn off the custom permalinks (and use the default structure), then revise my .htaccess to use this line:

    ErrorDocument 404 /404.html

    instead of this line:

    ErrorDocument 404 /index.php?error=404

    Then everything works as it should. It does seem like a bug in the software to me too, and I would be super appreciative (with a cherry on top) for a fix to this! If I can provide any more info to help troubleshoot this, please let me know! I’ve gone through a few hours worth of previous forum posts & documentation to no avail. Thanks in advance!

    Just in case this helps someone here, the cause of this problem for me was using FastCGI. A fix has been documented here.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘404 Not Working Properly’ is closed to new replies.