Re: Setting Up A Directory For HTTPS Secure Certificate
| From: | revDAVE | Date: | Sat, 18 Apr 2009 00:36:50 +0000 |
| Subject: | Re: Setting Up A Directory For HTTPS Secure Certificate | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-291658@lists.php.net to get a copy of this message | ||
GOAL : no one will be able to get to HTTPS directory VIA HTTP.....
So I make this little tester page that seems to work.... Later I'll add auto
redirect.... Is this the kind of thing to add to various pages? Is there a
better way to do this?
<?php
if ($_SERVER['HTTPS'] == 'on')
{
} else
{
?>
<a href="<?php
echo 'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
?>"><?php
echo 'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
?></a>
<?php
}
?>
--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]