Redirecting a website to secure .com

Redirecting HTTPS Websites

You have to have a valid certificate for both sites and I used “Let’s Encrypt” for that. I now enabled the redirection in the .htaccess file instead of at the domain level. I entered the redirect at the beginning of the file: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^(.*)$ https://www.example1.com/$1 [R=301,L]
</IfModule>
The downside is that you have to have a host platform for both “www.example.co.nz” and “www.example.com”, so you have to pay for two hosting platforms. This way your site is redirected “after” the certificate is read and avoids any certificate errors.
Happy website, happy client!]]>