Support » Fixing WordPress » WP intercepting ALL 404 errors from main site?

  • I noticed a strange behavior and I am not sure how it’s even possible since WP uses a RewriteBase in .htaccess.

    I have WP running off a subdirectory called /news/ as there are a handful of static pages above it in the webroot.

    Apparently WP somehow is catching all 404 errors for the website even when they are not off /news/ ?? Even above /news/ (ie. / )

    ie.
    http//example.com/cgi-bin/typo.cgi
    http//example.com/nonexistantpage
    will all end up at the WP 404 page instead of the main 404 page?

    I have the following in my .htaccess

    # wordpress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /news/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /news/index.php [L]
    </IfModule>

    there is absolutely nothing else in .htaccess that could route to /news/ so I have no clue how it’s ending up there?!

    The server is using Apache 1.33 on CentOS 3 if that matters.

    Thanks for any help / ideas…

Viewing 1 replies (of 1 total)
  • Okay figured out my own answer again sorry.
    But this might help someone else in the future.

    When you run WP in a sub-directory, the special .htacesss goes into that sub-directory, not the webroot .htacess !

    Didn’t realize that, though it seems obvious now.

Viewing 1 replies (of 1 total)
  • The topic ‘WP intercepting ALL 404 errors from main site?’ is closed to new replies.