Need help with .htaccess redirect please

3 replies
  • SEO
  • |
Code:
#RewriteCond %{HTTP_HOST} ^.com$ [nc]
#RewriteCond %{HTTP_HOST} ^www.old-domain.com$
#RewriteRule ^(.*)$ "http://www.new-domain.com/$1" [R=301,nc]
The above code rediects all of my domains including subdomains. Which is as far as I could get with making it work how I wanted it to.

Though I need to gain access to my subdomains to restrict googlebot access as on the new site the content what was on the subdomains doesn't exist anymore so it is causing lots of 404 errors in Webmaster tools.

My guess is it is because ths sub domain folders are inside the public_html folder but don't know how to edit this to leave certain folders alone.

Any ideas on what I need to change on this redirect to only direct root domain and leave subdomains alone?
#htaccess #redirect

Trending Topics