WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pages don't link to the correct subdirectory (4 posts)

  1. rrmia
    Member
    Posted 1 year ago #

    I have a site in my root folder that is live.
    I created a subdirectory, radonicrodgers.com/wp, 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]
    </IfModule>

    ... 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!!!

  2. rrmia
    Member
    Posted 1 year ago #

    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.

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    This file exists in my root folder.

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

  4. rrmia
    Member
    Posted 1 year ago #

    Thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Topic