Answers for "simple force https for html site"

3

force https in website

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Posted by: Guest on July-16-2020
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>
Posted by: Guest on May-07-2021

Browse Popular Code Answers by Language