I currently have a .htaccess
file with the current lines to force HTTPS:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
My main domain is example.com
I have a registered an alias in my cPanel: example.net
I would like to implement a rule so that if a user visits example.com
, they will be redirected to https://example.net
.
I've tried a few things and kept getting redirection errors. Can someone help me out, not sure what I should be doing here?