• Hello:

    First off if this topic has been covered before I apologize. I searched around but haven’t found the exact setup I’m trying to do. Anyhow… I’m running a WordPress 2.9.2 site and want to install a second version with totally different theme & plugins below that to act as a directory. So our main WP site is at https://www.example.com I would like to install the second one to run in https://www.example.com/directory not directory.example.com… anyhow once installed I can get to the main index page in directory but any sub pages are redirected via mod_rewrite to the main site. How can I tell mod_rewrite that anything heading into /directory/ should be handled by the 2nd install?

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try login to https://www.example.com/directory/wp-admin

    Then go to Setting -> General
    Double check if the url is https://www.example.com/directory/ (for both)

    Then go to Setting -> permalink
    Click save setting even you change the value or not, WordPress will automatically update .htaccess for you.

    If this not work, please post your .htaccess in sub directory here

    Thread Starter dmiyares

    (@dmiyares)

    Hi Ninenote:

    Did that for the directory install but didn’t work. Pages like example.com/directory/business/widgets come up as 404 on the main site ??

    Below is the .htaccess file for the directory. For the main website (also WP) just remove the directory/ in rewritebase.

    Is there a way to mix both? I can also use the apache setup files since I have access to them.

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

    In .htaccess of main website,
    Can you try put this line

    RewriteCond %{REQUEST_URI} !^/directory/

    immediately after

    RewriteCond %{REQUEST_FILENAME} !-d

    Not sure will this work or not, we tell first .htaccess to ignore any requests to that directory. Then the second one can do the job.

    Thread Starter dmiyares

    (@dmiyares)

    Hi Ninenote:

    Tried that and that didn’t work… I revisited my initial setup for this Apache instance and changed the allow overides to use the .htaccess files. Now it works perfectly out of the box ??

    Thanks for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Installing 2nd wordpress blog in sub directory of first… mod_rewrite?’ is closed to new replies.