• Resolved stevation

    (@stevation)


    I’ve been running two separate wp installations in one domain for a while, with one in the root and one in a subdirectory. It was fine until I had to turn on wp rewrites (permalinks) for the blog in the root directory. Now, I can’t access the blog in the subdirectory at all — I get 404 errors.

    I’m not a programmer, but I’m competent with figuring out my website stuff. I’ve struggled to understand some of the .htaccess statements that WP creates to make the rewrites work, but I basically understand that this line tells it that it should not redirect if an actual directory exists:
    RewriteCond %{REQUEST_FILENAME} !-d

    That works fine for any other subdirectory in my domain, but for the one subdirectory with another installation of WordPress in it, it does not work, and I get the 404 error.

    How can I fix this? I don’t want to turn off permalinks, because I need the rewrite rules to provide backward compatibility with some older blog entries using Gallery to host images.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You have an .htaccess in root and one in folder also?

    Thread Starter stevation

    (@stevation)

    Yes I have different .htaccess files in the root and the subdirectory. The blog in the subdirectory is not using permalinks and does not have rewrite rules enabled. The blog in the subdirectory is behind a username/password screen, so the .htaccess file has these entries (where “xxxx” is a name I deleted here):

    AuthType Basic
    AuthName "xxxx"
    AuthUserFile "/home/xxxx/.htpasswds/xxxx/passwd"
    require valid-user
    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    The username/password screen is causing your basic problem here. I think.

    Create a blank file. Call it onerror.html and put it in your root directory.

    In the root .htaccess file, add this to the top of the file:

    ErrorDocument 401 /onerror.html
    ErrorDocument 403 /onerror.html

    I think that will make it work.

    More info: http://wordpress.org/support/topic/89515

    Thread Starter stevation

    (@stevation)

    SWEEEEEET!!!!!

    Otto, you’re a wizard. I appreciate the help. That worked perfectly. Yesterday, I searched and searched and searched and couldn’t find the answer after trying numerous fixes. I appreciate you helping out, and your link to the other thread explained it very well.

    Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Rewrite rules with two wp installations in one domain’ is closed to new replies.