I have a bunch of domain names with different TLDs. What I want is to point several domains to the "main"-domain which has a SSL cert (single domain).
https://example.com (main domain with SSL cert) http://example.net (should redirect to https://example.com and rewrite the URLs) http://example.org (should redirect to https://example.com and rewrite the URLs)
The https domain points to the directory which contains the website data. I created a subfolder in that directory where I pointed the additional domains to, because I was thinking I could place a htaccess file there to manage redirection and rewriting. Is that OK so far?
I am having trouble finding the correct htaccess rules which permanently redirect the requested domain (either
https://example.com and rewrites the URLs correctly.
I tried the simplest thing that came to my mind:
Redirect permanent / https://example.com/
But that resulted in e.g.
https://example.net which, of course, does not work.
I use WordPress and put
https://example.com as blog URL as well as site URL in the settings and I made WordPress force SSL.
Can someone please help?