|
Posted by usenet on 11/28/05 18:59
On Tue, 22 Nov 2005 09:43:33 -0500, JDS <jeffrey@example.invalid> wrote:
>On Tue, 22 Nov 2005 08:12:11 +0000, Neeper wrote:
>
>> well. How do I verify this?
>
>look at $_SERVER
Expanding on jeffrey's reply, this will force a page from http:// to https:// in
PHP. Of course, it must be sent before any output to the browser.
<?php
if (!isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) != 'on') {
header ('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
exit();
}
?>
HTH
Navigation:
[Reply to this message]
|