Created
September 24, 2015 20:26
-
-
Save christierney402/e0c099f2a36942c71811 to your computer and use it in GitHub Desktop.
Require https for a specific domain, ignoring other domains that might use the same code base
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteBase / | |
#----- REQUIRE HTTPS for www.mysite.com ----- | |
RewriteCond %{HTTP_HOST} ^www\.mysite\.com [NC] | |
RewriteCond %{HTTPS} !on | |
RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment