Skip to content

Instantly share code, notes, and snippets.

@fazlurr
Last active April 5, 2018 04:49
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 fazlurr/e2fc89e497a115c7c5ca3b66183385a4 to your computer and use it in GitHub Desktop.
Save fazlurr/e2fc89e497a115c7c5ca3b66183385a4 to your computer and use it in GitHub Desktop.
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment