Created
September 25, 2017 17:49
-
-
Save cyancey76/e7e813073891d7040c09f15712a8e369 to your computer and use it in GitHub Desktop.
.htaccess force SSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FORCE SSL | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
# FORCE SSL for load balancer | |
RewriteEngine On | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment