Skip to content

Instantly share code, notes, and snippets.

@Wylbur
Created September 17, 2018 19:14
Show Gist options
  • Save Wylbur/64fbce66945641036cb21efa3758e2b2 to your computer and use it in GitHub Desktop.
Save Wylbur/64fbce66945641036cb21efa3758e2b2 to your computer and use it in GitHub Desktop.
HTTPS redirects
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment