Skip to content

Instantly share code, notes, and snippets.

@andrewspear
Last active December 21, 2015 08:28
Show Gist options
  • Save andrewspear/6278337 to your computer and use it in GitHub Desktop.
Save andrewspear/6278337 to your computer and use it in GitHub Desktop.
Force specific sub-domains of a site to use SSL
# Force SSL for specific subdomains
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(secure|login)\. [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment