• Hi all, thanks for reading this – hope you can help.

    I have been asked to install a 2nd wordpress install in a subfolder of domain with an existing WP site in the root.

    So the current install is at:
    https://www.example.com

    and the new install would be at:
    https://www.example.com/fr

    A problem has arisen where everytime we try to log in at /fr/wp-admin it redirects to /wp-login.php rather than /fr/wp-login.php

    I believe the problem lies with the htaccess files, but this is not in my comfort zone and I and tearing my hair out trying to fix the problem. Have read through quite a few posts on similar topics but none seem to apply to this particular configuration.

    The htaccess file in the root folder contains:

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

    And a separate htaccess file in the ‘fr’ subfolder contains:

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

    Can anyone please point out where I am going wrong and how I might fix this?

    cheers
    Craig

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi appshine,
    Did you create a new database for your subfolder site. If you have already created then the problem is related to siteurl and homeurl. In a simple way you can solve this by :
    1. Login to phpmyadmin
    2. Select your database and table name wp_options and update the option name “siteurl” & “home” to subfolder site url.
    Hope this will solve your problem quickly.
    Thanks

    Thread Starter appshine

    (@appshine)

    hi cedcommerce, thanks for your reply.

    I have gone from tearing my hair out to kicking myself – I can’t believe I missed that. DOH!

    Yes, that worked just fine.

    As it happens, the site in the subfolder started off as a duplicate of the site in the root of the domain. When I installed that, I duplicated and altered the db – I really should have remembered to alter the siteurl and home values.

    Thanks again for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘htacess problem with multiple WP installs’ is closed to new replies.