fbpx

Category: Best Programming Practices

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]

 

Join our mailing list

Get important news about cool products we release and invitations to beta test new products

Find out the Social networks we're on