I want to redirect an old domain (https & www) to the main one. I need to redirect it to the home page and blog. But, there are 4 pages on the old site I want to redirect to the subdomain of the main page.
How it should look:
Oldwebsite1.com -> mainwebsite2.com
Oldwebsite1.com/blog -> Mainwebsite2.com/blog
Oldwebsite1.com/category1 -> new.mainwebsite2.com/category1
Oldwebsite1.com/category2 -> new.mainwebsite2.com/category2 /// etc...
Will typical code like this work or do I need to adjust it?
#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://www.mainwebsite2.com/$1 [R=301,L]