Re: checking for and enforcing https
| From: | Wolf | Date: | Mon, 25 Feb 2008 18:55:41 +0000 |
| Subject: | Re: checking for and enforcing https | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-270104@lists.php.net to get a copy of this message | ||
---- Rick Pasotto <rick@niof.net> wrote:
> What is the best or recomended proceedure for making sure that a page is
> accessed only via a secure connection?
>
Make the server only send over 443 instead of 80...
But if you don't have the ability to change .htaccess or httpd.conf then you can use the
$SERVER variables and make them work that way...
Or you can cheat...
$url = $_SERVER['SERVER_NAME'];
header( 'Location:https://'.$url.'');
Wolf