Skip to content

Instantly share code, notes, and snippets.

@ravishakya
Created August 15, 2017 09:36
Show Gist options
  • Save ravishakya/3a1cad51cba6a2eb80ad2166ec190085 to your computer and use it in GitHub Desktop.
Save ravishakya/3a1cad51cba6a2eb80ad2166ec190085 to your computer and use it in GitHub Desktop.
Redirect all subdomain to http and other to https
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP_HOST} ^(?:[a-z0-9-])?cyclonethemes\.com
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]
// http://site1.example.com
// https://example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment