Skip to content

Instantly share code, notes, and snippets.

@smtechno
Last active November 13, 2020 10:21
Show Gist options
  • Save smtechno/8b9616306552c849f4e11978fe8f6fe7 to your computer and use it in GitHub Desktop.
Save smtechno/8b9616306552c849f4e11978fe8f6fe7 to your computer and use it in GitHub Desktop.
Forcing HTTPS on a Specific Domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain1.com [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment