From time to we need to redirect an old site to redirect to a new site.

The good thing about the redirect snippet below is that that it will also append the parameters sent to the old site to the new one.
That is very important especially if you're running ads or have links that have tracking parameters e.g. oldsite.com/?utm_source=orbisius.com

RewriteEngine On
RewriteCond %{HTTP_HOST} ^youroldsite.com$
RewriteRule ^/?(.+) http://yournewsite.com$1 [R=301,QSA,L]

 

Referral Note: When you purchase through a referral link (if any) on this page, we may earn a commission.
If you're feeling thankful, you can buy me a coffee or a beer