WordPress.org

Ready to get started?Download WordPress

Forums

Move wordpress blog to new subdomain and redirecting all posts to new location? (6 posts)

  1. Matthew Hui
    Member
    Posted 4 years ago #

    Right now my blog is on a subdomain but I want to move it to a different subdomain. What is the best way to redirect all posts from old subdomain url to new subdomain url?

  2. stvwlf
    Member
    Posted 4 years ago #

    First, you must go through the "move my blog" process detailed on this page. http://codex.wordpress.org/Moving_WordPress

    Then, I believe that putting this in the .htaccess file in the old subdomain will redirect everything to the equivalent URL in the new subdomain
    redirectPermanent / http://newsubdomain.example.com/

    The trailing slash after .com is required

  3. Matthew Hui
    Member
    Posted 4 years ago #

    Then, I believe that putting this in the .htaccess file in the old subdomain will redirect everything to the equivalent URL in the new subdomain
    redirectPermanent / http://newsubdomain.example.com/

    The trailing slash after .com is required

    Could I also do this?

    redirectPermanent http://subdomain.domain.com http://newsubdomain.domain.com/
  4. stvwlf
    Member
    Posted 4 years ago #

    no, the redirect code does not work that way

    The way I did it before accomplishes what you are after.

    If you want to test, set up a temp testing subdomain and redirect it to your present live site - if the temp subdomain is test and you have an about page on your live site then if its working correctly, when you enter http://test.domain.com/about it should redirect to
    http://newsubdomain.domain.com/about - test it out - you don't even need to have a page called about existing on the test subdomain for this to work.

  5. Matthew Hui
    Member
    Posted 4 years ago #

    Only problem is that I am using WordPress mu and the .htaccess file is shared by all of my blogs so the redirect would apply to all of my blogs as well. Any ideas? Thanks for the help so far

  6. stvwlf
    Member
    Posted 4 years ago #

    Hi - Best to ask that question on the WPMU forum http://mu.wordpress.org/forums/

Topic Closed

This topic has been closed to new replies.

About this Topic