my website opens when force https on code example
Example 1: force website to https
<IfModule mod_rewrite.c>
# Below
RewriteEngine On
# Force Https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
....
</IfModule>
Example 2: force https in website
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]