title: Redirecting HTTPS to HTTP in Magento with checkout exception (Apache)
body: <p>I am using a Magento installation with the one step checkout plugin, meaning I have very few pages that need HTTPS. I want to control HTTPS search indexing and user access by redirecting the whole HTTPS version of the site <em>except of course</em> for the secure checkout.</p>
  
  <p>The secure checkout section is <code>/onestepcheckout/</code> (and also includes some sub pages of that, i.e. <code>onestepcheckout/failure</code>).</p>
  
  <p>This is what I have so far but the HTTPS is not kicking in on the checkout page with this code, the redirect works in all other case (i.e. I send index HTTPS to index HTTP) just the exception that is broken:</p>
  
  <pre><code>#Redirect HTTPS to HTTP except checkout 
  RewriteCond %{HTTPS} on
  RewriteCond %{REQUEST_URI} !^onestepcheckout
  RewriteRule ^(.*)$ http://www.mysite.co.uk/$1 [R=301,L]
  
  #Require SSL on checkout
  RewriteCond %{HTTPS} !on
  RewriteCond %{REQUEST_URI} ^onestepcheckout\/?$
  RewriteRule ^(.*)$ https://www.mysite.co.uk/$1 [R=301,L]
  </code></pre>
  
  <p>I am also vaguely cautious that the <code>/onestepcheckout/</code> does not contain secure resources and therefore an exception may need adding to images and style sheets etc.</p>