How to find out if you’re using HTTPS without $_SERVER[‘HTTPS’]
This should always work even when $_SERVER[‘HTTPS’] is undefined: The code is compatible with IIS. From the PHP.net documentation and user comments : Set to a non-empty value if the script was queried through the HTTPS protocol. Note that when using ISAPI with IIS, the value will be “off” if the request was not made … Read more