Redirect traffic to https
- by Arpanet
I need to redirect the following instances to https://www.mydomain.com;
mydomain.com
www.mydomain.com
http://www.mydomain.com
I have the following in my .htaccess already, but this only redirects mydomain.com to https://www.mydomain.com;
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
Grateful if anyone could perhaps tell me what I need to add. Thank you.