: Proper syntax for .htaccess Rewrite 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
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 ^(.*)$ newsite.com/ [R=301,L]
More posts by @LarsenBagley505
1 Comments
Sorted by latest first Latest Oldest Best
Yes that's correct and would 301 redirect everything on oldsite.org to the same path on newsite.com. Plenty of similar questions on the StackExchange network such as this one.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.