title: mod_rewrite - exclude urls
body: <p>I need a mod_rewrite to redirect all <code>http</code> requests to <code>https</code>, but I want do exclude some URLs</p>
  
  <pre><code>#   force https
  RewriteCond %{HTTPS}            off
  RewriteCond %{HTTP_HOST}        ^secure\. [NC]
  RewriteCond %{REQUEST_URI}      !gateway_callback [NC]
  RewriteRule ^.                  https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,QSA]
  </code></pre>
  
  <p>All URLs which match <code>gateway_callback</code> must be excluded</p>
  
  <p>This URL should not be redirected, but it does!?</p>
  
  <pre><code>http://secure.localhost/da/gateway_callback/29/
  </code></pre>
  
  <p>Have tried to flush DNS cache in the browser, but the URL is still redirected to <code>https</code></p>