Redirect HTTPS to HTTP
<p>Very simple issue we cannot resolve. The following code does not redirect properly:</p>

<pre><code>$location = str_replace("http","https",$this-&gt;page-&gt;current_url);
header( "Location: ".$location );
</code></pre>

<p>I get a 400 Error: "Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.Instead use the HTTPS scheme to access this URL, please." </p>

<p>How can I redirect in PHP from a page served over HTTPS to a page served over HTTP for scenarios such as secure login and then redirect to nonsecure app page?</p>
