I know the situation may arise where you might need to redirect a domain to another domain. So i am going to tell you the easiest way to do that. You can do this by logging in to your cpanel only. You don’t need to change any code in .htaccess for that.
Let us see how to do that-
Log in to your cpanel account. I hope you already know how to log in to your cpanel account.
FInd the “Redirects” link that may look like as shown below.
Click “Redirects”. A new page will open up as shown below.
Now, there are two options available at this point. Temporary and permanent redirect. I expect that you want to to permanently redirect your domain to other. Select the permanent 301 option from the drop down. Fill the remaining options as per your need. I have shown the sample fill up options below. Please tick the wild card redirect option to easily redirect all the sub domain to new domain.
Please see the screen shot below-
Just click add button and you are done. Now you can redirect any domain to other domain using this process.