ok, i have at site a blog.mysite.com, and recently migrated all content to a new wp install at mysite.com.

i want to redirect all of the posts from blog.mysite.com to mysite.com and also account for permalink structure.

blog.mysite.com is /%year%/%monthnum%/%day%/%postname%/

mysite.com is /%category%/%postname%/

the goal is if anyone goes to

blog.mysite.com /%year%/%monthnum%/%day%/%postname%/

they will be redirected to

mysite.com is /%category%/%postname%/

i want to ultimately delete all content at blog.mysite.com as well, so i wound want to make this work via .htaccess after it's deleted.

i can't seem to work out exactly how to do this in .htaccess.

also, both sites live in their own directories on the server.

/blog.mysite.com and /mysite.com

thanks so much for your help!

  • also, i thought about using (wordpress.org/plugins/redirection) but i think i would need to install it at blog.mysite.com, and if i ultimately want to delete that site, it will be deleted too:)
    – roybatty
    Jul 29, 2014 at 3:36

2 Answers 2


yes, use the redirection plugin. redirect all traffic from blog.mysite.com to mysite.com and use the plugin for a second redirect to the actual page.

After you moved the site and change the htacess run a crawler on mysite.com and fix the 404 errors that you will see.

  • thanks! i'm looking for an htaccess solution though.
    – roybatty
    Jul 29, 2014 at 12:58

this was the answer via htaccess (to be placed in htaccess within the blog.mysite.com directory).

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(?:blog\.)site\.com$ [NC]
RewriteRule ^ http://site.com%{REQUEST_URI} [L,R=301]
  • why was this downvoted? it is the specific answer to the question i asked.
    – roybatty
    Aug 6, 2014 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.