I am writing a rule with the IIS Rewrite module to detect if a URL request is formed HTTP://
or HTTPS://
The documentation says "HTTPS can be used to determine if a secure connection was used". https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-configuration-reference#Accessing_URL_Parts_from_a_Rewrite_Rule
But it's possible that a valid HTTPS URL may not be secure (eg because of an invalid SSL certificate).
In which case would the {HTTPS}
variable be true or false?
Is there a better way?