Skip to content

Instantly share code, notes, and snippets.

@dlamotte
Last active December 18, 2015 22:09
Show Gist options
  • Select an option

  • Save dlamotte/5852251 to your computer and use it in GitHub Desktop.

Select an option

Save dlamotte/5852251 to your computer and use it in GitHub Desktop.
Force SSL with Apache
RewriteEngine On
RewriteCond %{HTTP_HOST} != host.com
RewriteRule ^/?(.*) https://host.com/$1 [R,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://host.com/$1 [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment