title: https and http combined .htaccess
body: <p>I've got the follow problem.</p>
  
  <p>I have a website and for the directories /members and /admin I have a .htaccess which forces these URLs to go to https:// 
  All other URLs are forced to go to normal https://</p>
  
  <p>Now, for /members which is https:// I have in the pages a reference to /js/script.js which in imported into the page, but ofcourse this directory /js is forced to normal http:// while the page is displayed in https://</p>
  
  <p>Internet Explorer users are shown a popup if they want to view non-secure content in the secure page, if they click yes, it's ok. If they click no, then the javascript doesn't work.</p>
  
  <p>The /js is used in the normal http:// website and also in the /members secure website. This also is the case for the /images directory</p>
  
  <p>So i'm not sure how to solve this problem. Other than say that /js and /images can be https or http. But I have no clue on how to configure this in the htaccess file.</p>
  
  <p>Any help would be much appreciated!</p>
  
  <p>This is the htaccess file I use now :</p>
  
  <pre><code>  #Turn SSL on everything, except members and admin
    RewriteCond %{HTTPS} =off
    RewriteCond %{REQUEST_URI}  ^(/members|/admin)
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  
    # Turn SSL off everything, except members and admin
    RewriteCond %{HTTPS} =on
    RewriteCond %{REQUEST_URI} !^(/members|/admin)
    RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  </code></pre>