I have 2 domains, a .net and .org domain and I've made my main site domain using the .net domain and I would like to add the .org domain and redirect it completely (web browser) to the main domain.
I've added the 2nd domain using "Add Domains" in my CyberPanel. Then within the File Manager, I've created an .htaccess file in the folder of the Addon Domain and included the following code to redirect the .org domain to the .net domain.
This is an example of what I have right now:
Code added to the .htaccess file:
RewriteRule ^(.*)$ https://domain.net/$1 [R=301,L]
It's not working. What am I doing wrong? What do I need to do to make this work? I rather not do Domain Alias because I want the .org domain to automatically redirect to .net domain. I don't want duplicate content, and I don't want my site to show content on both domains simultaneously, either or.
I have another website on a different host that uses cPanel and there is an Addon Domain feature which I've used successfully to create an addon domain. I'm also using the same coding above to redirect the .org to the .net (main site domain). It works like it should.
I'd appreciate the help and information on how to make this work. This is only my 2nd day using a panel like CyberPanel. I'm still learning.