Skip to content

Instantly share code, notes, and snippets.

@BumbuKhan BumbuKhan/.htaccess
Created Nov 17, 2017

Embed
What would you like to do?
.htaccess - redirect HTTP to HTTPS
# 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
You can’t perform that action at this time.