I know this is an old post but recently (2025) I have seen "Request.ServerVariables("HTTPS")" returning "off" even when the site is HTTPS/SSL and the browser shows a valid certificate.
This is a great work around:
if request.servervariables("SERVER_PORT") <> "443" then ...