.htaccess rule to force SSL on only certain domains
snippet in htaccess

.htaccess rule to force SSL on only certain domains

user580

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP_HOST} ^(?:[a-z0-9-]+\.)?example\.com
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]