title: .htaccess redirect to https with conditions page
body: <p>I have the following .htaccess</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{HTTPS} !on
  RewriteCond %{REQUEST_URI} !(/webservice|/api)
  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  
  RewriteCond %{SCRIPT_FILENAME} !-f
  RewriteCond %{SCRIPT_FILENAME} !-d
  RewriteRule !\.(gif|jpg|png|css|js|swf)$ index.php [L]
  </code></pre>
  
  <p>I want all pages to be redirected to https, except /webservice and /api in those two I want it to open with both http and https.</p>
  
  <p>In https requests everything works fine the problem is when I try to access http.</p>
  
  <p>Problems</p>
  
  <pre><code>http://www.local.test/sub/pt-br/webservice redirect to https://www.local.test/index.php
  
  http://www.local.test/sub/pt-br/api redirect to https://www.local.test/index.php
  </code></pre>
  
  <p>Any idea to make it work?</p>