Answers for "force https"

5

force .htaccess

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Posted by: Guest on June-23-2020
2

force https

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Posted by: Guest on July-16-2020
2

force http to https htaccess

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Posted by: Guest on May-30-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