Skip to content

Instantly share code, notes, and snippets.

@ajitbohra
Created March 10, 2017 10:48
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 ajitbohra/a34a48c7a71e8198f6da0a105aa77dab to your computer and use it in GitHub Desktop.
Save ajitbohra/a34a48c7a71e8198f6da0a105aa77dab to your computer and use it in GitHub Desktop.
Force secure access to domain / website
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment