Skip to content

Instantly share code, notes, and snippets.

@adamgavlak
Created September 13, 2017 16:48
Show Gist options
  • Save adamgavlak/8bfdd43f493152e45c66f1c5c35a8e4f to your computer and use it in GitHub Desktop.
Save adamgavlak/8bfdd43f493152e45c66f1c5c35a8e4f to your computer and use it in GitHub Desktop.
Force SSL
RewriteEngine on
# Force ssl
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://www.%{SERVER_NAME}%{REQUEST_URI} [L,R=301,NC]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment