Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save torbentschechne/8e71e0364823de12be766593744352de to your computer and use it in GitHub Desktop.
Save torbentschechne/8e71e0364823de12be766593744352de to your computer and use it in GitHub Desktop.
http to https - 301 redirect
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment