Skip to content

Instantly share code, notes, and snippets.

@mi-ca
Created April 18, 2017 14:21
Show Gist options
  • Save mi-ca/33b051f67eaa98e97722abb34ff709d1 to your computer and use it in GitHub Desktop.
Save mi-ca/33b051f67eaa98e97722abb34ff709d1 to your computer and use it in GitHub Desktop.
Force http 2 https with .htaccess file
# FORCE https
RewriteEngine On
RewriteCond %{HTTPS} off
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