I have recently stopped using a subdomain for my blog, i need to forward all links that use that domain to the same link path but on my main domain.
Example being:
- blog.example.com/blog/sales/blog-title
needs to redirect to :
- www.example.com/blog/sales/blog-title
I can redirect the subdomain itself so
-blog.example.com/
goes to
- www.example.com/blog
but as soon as I try to redirect a page it doesn't redirect and doesn't load. Can anyone shed some light on it? I currently have this in my htaccess for my main redirect:
RewriteCond %{HTTP_HOST} ^blog\.example\.com [NC]
RewriteRule (.*) http://www.example.com/blog/$1 [L,R=301]
I have other subdomain redirects going on but none wildcard redirect.