.htaccess redirect both naked http and https to www https
问题 I have similar issue on one of my domains. I have SSL cert installed both for naked and www-domain. Now, however I want to redirect both naked http://domain.com and https://domain.com to https://www.domain.com. I have this rules in my .htaccess, but it covers redirect when you visit site explicitly with https://domain.com, but, when visiting http://domain.com, it redirects to http://www.domain.com instead https://www.domain.com. RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$ RewriteCond %{HTTPS}s