You can use this code which will redirect all your website's requests on port 80 {used by Http} to port 443 (SSL)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://domain.com/$1 [R,L]
You can use this code which will redirect all your website's requests on port 80 {used by Http} to port 443 (SSL)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://domain.com/$1 [R,L]