I have one domain domain1.tld and i would like to redirect all traffic using .htaccess to the matching domain2.tld url, keeping the original structure, so for example if the user types https://subdomain.domain1.tld/aboutus.html the rule should redirect to https://subdomain.domain2.tld/aboutus.html, for http://domain1.tld it should redirect to http://domain2.tld and so on.
I got this by now:
Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://domain2.tld$1 [R=301,L]
but i still need to redirect to https when enabled and the subdomain redirection.
Any help appreciated.