Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save torbentschechne/426b47f4d3c86e8416d866f443c0f59e to your computer and use it in GitHub Desktop.
Save torbentschechne/426b47f4d3c86e8416d866f443c0f59e to your computer and use it in GitHub Desktop.
301 Redirect from http to https
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
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