Skip to content

Instantly share code, notes, and snippets.

@shabbirbhimani
Created December 23, 2017 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shabbirbhimani/6e8af4f61f927e7d7fac2c82f6e8ddfe to your computer and use it in GitHub Desktop.
Save shabbirbhimani/6e8af4f61f927e7d7fac2c82f6e8ddfe to your computer and use it in GitHub Desktop.
htaccess Redirect HTTP to HTTPS using mod_rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment