1

I'm very new at this so apologies if this is too easy, but would this be proper syntax for redirecting an entire site to a new domain? This is what was suggested so my other concern is blank lines, spaces, etc. Thanks

RewriteEngine On

# Redirect Entire Site to New Domain
RewriteCond %{HTTP_HOST} ^oldsite.org$ [NC]
RewriteRule ^(.*)$ http://newsite.com/$1 [R=301,L]

1 Answer 1

2

Yes that's correct and would 301 redirect everything on oldsite.org to the same path on http://newsite.com. Plenty of similar questions on the StackExchange network such as this one.

1
  • Thanks Geoff. @krokola directed me to that question but I just wanted to be absolutely certain.
    – lstewart
    Commented Feb 23, 2014 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.