How to redirect base url addresses to another base URL

Say you have http://abhinav.spsdarj.org/2017/12/how-to-redirect-base-url-addresses-to-another-base-url/ as a url on your old website (abhinav.spsdarj.org) and now you want the link to redirect to new website. Say abhinav.ga but the url following abhinav.ga should stay the same and when typing the old url, should magically redirect with rest of the link intact to the new website.

Here’s what you do. Go to the old site’s folder in your file manager, access the .htaccess and add this:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^abhinav\.spsdarj\.org$ [OR]
RewriteCond %{HTTP_HOST} ^www\.abhinav\.spsdarj\.org$
RewriteRule ^(.*)$ "http\:\/\/blog\.abhinav\.ga\/$1" [R=301,L]

This supports multiple redirects.