Skip to content

Instantly share code, notes, and snippets.

@nizaroni
Created September 19, 2012 19:46
Show Gist options
  • Save nizaroni/3751799 to your computer and use it in GitHub Desktop.
Save nizaroni/3751799 to your computer and use it in GitHub Desktop.
Force SSL / https in .htaccess
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment