Subdirectory to Subdomain (2 posts)

  1. bongkph
    Posted 5 years ago #

    I have a subdirectory (site.com/blogs)that I want to convert into subdomain (blogs.site.com). Here is what I did.

    - On CPanel I created a subdomain "blog" and mount the existing /blog directory as path so no need to create a new directory for the new subdomain.

    - Since WP is already installed and running on /blog, there is no need to move files.

    - I login to WP and change the WP Address and Site Address to http://blogs.site.com

    - htacess was modified and added this:
    Options +FollowSymLinks -MultiViews
    RewriteEngine on
    RewriteRule ^blogs/(.*) http://blogs.site.com/$1 [R=301,NC]

    - Also added a 301
    Redirect 301 /blogs/ http://blogs.site.com/

    Is there something I missed or did I made something wrong? If there are other ways to convert a subdirectory to a subdomain please tell me. Thanks.

  2. jeezyo
    Posted 5 years ago #

    I might be missing something, but it sounds like this is over-complicating things. You should only need to, 1) create your subdomain 2) change the URL's in the settings of your wordpress install 3) move your files over.

Topic Closed

This topic has been closed to new replies.

About this Topic