Support » Fixing WordPress » Pages don't link to the correct subdirectory

  • Resolved rrmia


    I have a site in my root folder that is live.
    I created a subdirectory,, to work on a new site that I will use to replace the root site in the future.
    My subdirectory site is linking to the home page of my root site for some reason.
    I researched and learned that I have to add..

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

    … to my .htaccess file. This file exists in my root folder.
    Now, when I add this code to .htaccess file, my subdirectory site connects all perfectly
    BUT, it turns out that it makes the root site now link to the subdirectory site pages.

    Is it because both sites have the same named pages? How can I fix this and have the root site stay connected to its root pages and the sub site connect to its own pages in the subdirectory?

    Please I’ve been struggling with this for days, help would be greatly appreciated!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Just to be clear, my root site is NOT a wordpress site. I installed wordpress into a subdirectory. I’m trying to design an updated version of my root site but in wordpress in a subdirectory.

    This file exists in my root folder.

    No. It should be in the WordPress root folder – ie in the /wp folder.

    Thank you very much!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pages don't link to the correct subdirectory’ is closed to new replies.