title: Using 'mod_rewrite' how do I force HTTPS for certain paths and HTTP for all others?
body: <p>I have a PHP-Apache application using <code>mod_rewrite</code> for clean URLs.  I am having a lot of touble getting certain pages and paths forced to HTTPS while also ensuring all others will remain as HTTP.</p>
  
  <p>Here is an example of what I mean:</p>
  
  <pre><code>// http://www.example.com/panel/ -&gt; Should always redirect to HTTPS
  // http://www.example.com/store/ -&gt; Should always redirect to HTTPS
  
  // Anything not in the above should always be HTTP
  // so...
  // https://www.example.com/not-in-above-rules -&gt; Should always redirect to HTTP
  </code></pre>
  
  <p>Any ideas?</p>