Created
February 7, 2017 13:11
-
-
Save lfbittencourt/d3be88c3bdf4522ac2cbc67b405dea4f to your computer and use it in GitHub Desktop.
Force SSL/https without redirect loop
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Force SSL | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment