Reputation: 247
I switched URLs and am redirecting each page to the corresponding page on the new site. My site was relatively small, so I just used Redirect 301 / for each page. I'm to the point where the Redirect 301 / is set up for all of the pages except the home page. For example:
Redirect 301 /blog http://newsite.com/blog
Redirect 301 /page-name http://newsite.com/page-name
For the home page I tried to use:
Redirect 301 / http://newsite.com
Which works, except for it redirects every single page on my old site to the home page and overrides all of the other 301 redirects I set up.
I imagine this is fairly simple but I couldn't find anything googling. Also, please let me know if I'm setting up the 301 redirect incorrectly.
Thanks
Upvotes: 2
Views: 59
Reputation: 786091
You need to use RedirectMatch
directive for this to target specific URL
RedirectMatch 301 ^/$ http://newsite.com
RedirectMatch
supports regex as opposed to Redirect
.
Upvotes: 1