Support » Fixing WordPress » sub-folder installation URL auto-redirects to wrong domain

  • Hey everyone!

    I have 2 different websites set up on my FTP server. My first website is in my root directory with the domain address I have a second domain address that is linked to a sub-folder of the same FTP server root/personal/. WordPress is installed in the ‘personal’ sub-folder.

    In the root directory, the .htaccess file has:

    RewriteCond %{HTTP_HOST} ^(www\.)?$
    RewriteRule ^(.*)$ http://www\$1 [QSA,L,P]

    This correctly directs to the sub-folder as the root and works fine.

    In the sub-folder, the .htaccess file has:

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

    This now makes my permalinks work correctly.

    The problem i am having is that when i click any link, say for example the ‘about’ page, the domain address re-directs to instead of

    i tried changing the site URL and wordpress URL from to this works, but then screws up my permalinks.

    im afraid ive hit a wall and not sure what to do next…
    Any help on this matter would be be great!

    thanks in advance

  • The topic ‘sub-folder installation URL auto-redirects to wrong domain’ is closed to new replies.