Rewrite rule for httpd.conf and virtual host SSL
snippet in htaccess

Rewrite rule for httpd.conf and virtual host SSL

user3731

<VirtualHost IPADDRESS:80>
  RewriteEngine On

  # Rewrite everything except the blog to SSL
  RewriteCond %{REQUEST_URI} !^/blog
  RewriteRule (.*) https://www.example.com/$1 [L,R,QSA]
</VirtualHost>

<VirtualHost IPADDRESS:443>
  RewriteEngine On

  # Rewrite the blog back to plain http
  # Leave this out if you don't care that https requests to the blog stay
  # on ssl
  RewriteRule ^(blog*) http://www.example.com/$1 [L,R,QSA]
</VirtualHost>