I have a blanket redirect setup on the server like this:
<IfModule mod_rewrite.c>
RewriteEngine On
#redirect all port 80 traffic to 443
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]
</IfModule>
Now I would like to exclude one domain and I cant seem to work it out...
Here is what I tried:
<IfModule mod_rewrite.c>
RewriteEngine On
#redirect all port 80 traffic to 443
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST) !example.com
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]
</IfModule>
However it still redirects http://example.com to https://example.com. What am I doing wrong?
PS. I tried in other browser so browser caching should not be an issue.