• Resolved apitechcoord

    (@apitechcoord)


    I want to point my site to a subdirectory, but I don’t want the URL to show what the subdirectory is. I followed steps below from http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
    but when I put in http://www.attachedfamily.com it rewrites to http://www.attachedfamily.com/membersonly

    See http://wordpress.org/support/topic/moving-wordpress-to-subdirectory?replies=7#post-3286775 for more background.

    Any help is much appreciated!

    Thanks,
    Naomi

    Pointing your home site’s URL to a subdirectory

    In some cases, you may have a WordPress site that changes significantly every year, such as with a conference website. If you want to install each year’s version of the site in a subdirectory, such as /2010, /2011, and /2012, but have the root domain (yoursite.com) automatically redirect to a particular subdirectory (usually the latest), follow this technique:

    Install WordPress in a subdirectory, such as /2012.
    In your root folder (not the subdirectory folder), download and open your .htaccess file.
    Add the following to your .htaccess file:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
    RewriteRule ^(/)?$ blog [L]

    In the above code, change the “YourDomain.com” value to your root domain.
    In the above code, change the “blog” value to the subdirectory.
    Save and upload the .htacess file back to your root directory.

    Now when users to go your root domain (yoursite.com), it will automatically redirect to the subdirectory you specified. When you want to redirect to a new subdirectory, such as the conference site for next year, just update the .htaccess redirect code.

Viewing 1 replies (of 1 total)
  • Thread Starter apitechcoord

    (@apitechcoord)

    I used the steps here (again)
    Using a pre-existing subdirectory install

    But this time I set the WordPress address and Site Address properly. I had done them backwards on my first attempt! All better now. 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Pointing URL to a subdirectory’ is closed to new replies.