Trouble redirecting to HTTPS with PHP
<p>I just had an ssl installed for a site I am working on and I obviously need to get a few of the pages (checkout etc) redirected to https.</p>

<p>I am currently using this code:</p>

<pre><code>if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) {   
    $url = 'https://www.mysite.php';
    header("location: ". $url);
    exit();
}
</code></pre>

<p>Firefox is telling me that "the page is trying to redirect in a way that will never complete."</p>

<p>A var_dump of $_SERVER shows no ['HTTPS'] or similar when I am on the secure page. This is on a Network Solutions small unix package. Is it possible I need to be checking for a different server variable or perhaps I need to change some server settings?</p>

<p>Clearly the script is never finding HTTPS so it is trying to redirect without end.</p>
