Re: https detection
| From: | Eugene Lee | Date: | Sun, 12 Oct 2003 12:27:21 +0000 |
| Subject: | Re: https detection | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165895@lists.php.net to get a copy of this message | ||
On Sun, Oct 12, 2003 at 08:52:30PM +1000, Tom Rogers wrote:
: Sunday, October 12, 2003, 8:46:41 PM, Eugene wrote:
: EL> On Sun, Oct 12, 2003 at 01:24:40PM +0200, Rosen wrote:
: EL> :
: EL> : I.e. if I use _SERVER["SERVER_PORT"] = 443 - for https connection
: EL> : and 80 for "normal" - i'll be able to determite if user is in https
: EL> : mode - I think thath should be works . ?
:
: EL> Technically, you can't guarantee that anything running over port 443
: EL> will be HTTPS. This is part of the more general problem of running your
: EL> web server on non-standard ports.
:
: His script will only see valid ssl connections as all other attempts should be
: ditched by apache or whatever before php gets involved...in theory anyway :)
Unless Apache is configured so that both SSL and non-SSL virtualhosts
to point to the same directory containing said script, or said script is
shared (via PHP include(), require(), etc.) by other PHP scripts in both
SSL and non-SSL virtualhosts. :-)
And $_SERVER['HTTPS'] is so much easier to check for existence!