Reputation: 5119
I would like to know how to add a condition that if the url is a subdomain, then ignore the "Force" https condition
Here the .htaccess that add the force HTTPS
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
Upvotes: 1
Views: 617
Reputation: 11
Try to add this before the last line
RewriteCond %{HTTP_HOST} ^(example\.com|www) [NC]
Upvotes: 0
Reputation: 7476
Try this RewriteCond
in your htaccess
RewriteCond %{HTTP_HOST} ^www
Upvotes: 1