Page 1 of 1

$_SERVER['HTTPS']

Posted: Thu Jul 10, 2003 5:54 pm
by net7

Code: Select all

$_SERVERї'HTTPS']
creats an error

Code: Select all

Notice: Undefined index: HTTPS in C:\Apache\Apache2\htdocs\admin\admin_functions.inc on line 92
Help please-- I think I have had this working before, but if not do you know how to get the HTTPS variable working? Or how to access it maybe..

Posted: Thu Jul 10, 2003 10:14 pm
by bionicdonkey
i don't think HTTP is an index (it's not in the manual). what did you need to access it for?

Posted: Fri Jul 11, 2003 12:10 am
by net7
Well thats the way it was written in my O'Reilly Programming PHP book. However I think thats a bit old. I managed to figure out that..

1.) My server didn't have SSL installed on it =/
2.) That was the incorrect way to find if HTTPS was on

I figured out that the SSL port (after installing it) was 443, so I'd check the port of the visitor's connection to the server, if it was not 443 then they were to be directed back to an https:// address. :)