I have two virtual hosts in httpd.conf one for port 443 and one for port 80:
<VirtualHost IPADDRESS:80>
</VirtualHost>
<VirtualHost IPADDRESS:443>
</VirtualHost>
Now I want to redirect every request to my server to go to https://www.mysite.com/ except for http://www.mysite.com/blog/ I want the blog to be non SSL. Where should I put RewriteRules, in which of the virtualHost directives? And what kind of rule do I need for that?
In the port 80 VirtualHost, a rule will rewrite everything that isn’t the blog to SSL. In the 443 host, it will rewrite blog requests to non-ssl (if you want to force them back to non-ssl)