• I can’t seem to get my 404 error page working. I’ve followed the instructions and have a 404.php file in my current theme folder.

    WordPress 2.0 is installed in the following folder:

    https://www.mydoomain.com/wp/

    My .htaccess file looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php
    </IfModule>

    # END WordPress

    ErrorDocument 404 /wp/index.php?error=404

    When I type in an incorrect URI I just see a blank page, the source of which looks like this:

    <html><head></head><body></body></html>

    Any ideas on where I’m going wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jeanluc

    (@jeanluc)

    UPDATE:

    It looks like the 404 page is working but only where the requested page is one or more directories deep.

    example:

    https://www.mydomain.com/about/blabla

    this displays the error page where ‘blabla’ does not exist. However this next example just displays a completely blank page:

    https://www.mydomain.com/blabla

    Again ‘blabla’ doesn’t exist. Any idea anyone?

    J

    I have that same problem and I think it has to do with WordPress’s new feature of automatically redirecting top-level pages to the main homepage.

    So, on my old site, before I upgraded to WordPress, I had a page called https://example.com/faq.html and used an .htaccess redirect once I moved that page to https://example.com/faq in case people had old links pointing to it.

    RewriteRule ^faq\.html /faq

    However, any page that errors out at the example.com level https://example.com/blahblah will just cause WordPress 2.0.1 to load the main page keeping the URL intact. This is what the last lines in the WordPress part of the .htaccess file do, I’m fairly certain. I am also looking for a solution to this problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘problems getting 404 error page working’ is closed to new replies.