Redirect all links under sub-folder to sub-domain

Recently we moved our WordPress blog from residing under a sub-folder (mysite.com/blog/) to its own sub-domain (blog.mysite.com).

Although in various articles this move is not recommended SEO wise, we had no choice (different servers for the main site and the blog).

We had to redirect all of our blog posts to point to the new sub-domain structure and avoid 404 broken links. Here is the code we implemented in our .htaccess file:

Need help making your custom redirects? Post your comments below or contact us using the form on the right.

Leave a Reply

Your email address will not be published. Required fields are marked *