We are trying to do SSL offloading through a proxy server for an IIS instance, and I'm wanting to use URL Rewrite in order to tell the underlying ASP.NET and Classic ASP pages that, in spite of being served on port 80 over plaintext HTTP, they are secure. I am doing this by setting the HTTPS server variable to "on" and the SERVER_PORT_SECURE server variable to "1". If I access our site through the proxy server at https://servername.tld/default.asp, the HTTPS variable is set to "on", however, if I access it at https://servername.tld (no filename specified), the HTTPS variable is set to "off". It does this for both an ASP.NET web form default document (Default.aspx) and a classic ASP default document (Default.asp).
I have verified that the rule's pattern is matched and that the rule is firing via failed request tracing. It says that it set the server variables, but when the code reads them, they are back to their default values. What gives? This happens for subdirectories, as well -- not just the site root.
Please help!
Edit: Attaching an image to show that the rule is matched.
I did notice that, after all of that, there is a CHILD_REQUEST_START for index.asp, which is the file that is actually served by IIS. Is this perhaps in a completely different context? If so, how do I get the server variables to carry through to the child request? Should I set a header and then check for that?