Created
November 17, 2017 12:23
-
-
Save BumbuKhan/fc6bd0072b34f8a245c669f6935c56bf to your computer and use it in GitHub Desktop.
.htaccess - redirect HTTP to HTTPS
This file contains 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
# BEGIN Force SSL | |
# This should be the first rule before other rules | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] | |
</IfModule> | |
# END Force SSL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment