Disable NON-SSL access for a subdomain

I have a subdomain secure.domain.com and want it to be accessible through SSL only. All the files for secure.domain.com are in the private_html, however I want to completely disable the option to login without SSL and redirect all non-ssl to the ssl-folder.. Using a php redirect script isn't possible, because I would need to put it in every subdir.
RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

javascript ajax post

function Inint_AJAX() 
{

   try { return new ActiveXObject("Msxml2.XMLHTTP");  } catch(e) {} //IE
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
   try { return new XMLHttpRequest();          } catch(e) {} //Native Javascript
   alert("XMLHttpRequest not supported");
   return null;

}

var http = Inint_AJAX(); var url = "example.php"; var params = "content=1"; http.open("POST",url+"?"+params, true); http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", params.length); http.setRequestHeader("Connection", "close"); http.onreadystatechange = function() {//Call a function when the state changes. if(http.readyState == 4 && http.status == 200) { document.getElementById('divid').innerHTML=http.responseText; //retuen value }