title: set a php page to useSSL
body: <p>Hi I have a php application I would like the account.php page to be secure however after adding this to the page </p>
  
  <pre><code>    $use_sts = true;
  
      // iis sets HTTPS to 'off' for non-SSL requests
      if ($use_sts &amp;&amp; isset($_SERVER['HTTPS']) &amp;&amp; $_SERVER['HTTPS'] != 'off') {
          header('Strict-Transport-Security: max-age=31536000');
      } elseif ($use_sts) {
          header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],  true, 301);
          // we are in cleartext at the moment, prevent further execution and output
          die();
      } 
  </code></pre>
  
  <p>however when I browse the page it is set to HTTPS but the content is all over the place when I look at the source it shows file requests using http: </p>
  
  <pre><code>&lt;script type="text/javascript" src="http://****/assets/jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://****/assets/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://****/assets/tables.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://****/assets/global.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://****/assets/cycle.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>is there a way to set a specific page to use SSL</p>
  
  <p>I also tried this with the .htaccess but got the same result </p>
  
  <pre><code>    # force https for
      RewriteCond %{HTTPS} =off
      RewriteRule ^(index|login)\.php$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]       
  </code></pre>
  
  <p>thanks</p>
  
  <p>M</p>