Skip to content

Instantly share code, notes, and snippets.

@mucahitnezir
Created May 10, 2017 19:10
Show Gist options
  • Save mucahitnezir/e188d991d83221b0c53a152fc4be645e to your computer and use it in GitHub Desktop.
Save mucahitnezir/e188d991d83221b0c53a152fc4be645e to your computer and use it in GitHub Desktop.
.htaccess commands for ssl redirection (http to https)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
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