I have this application that I just installed a SSL
certificate for. Yest I tried to redirect the users to use only the HTTPS://url.com
. and prevent them from using the http://url.com site
. However because I lack understanding the regular expressions to define the Pattern and the condition and unfortunately, I could not find a guide with some example of how to define those rules. I would like a concrete example of how to set this up https://{HTTP_HOST}{REQUEST_URI}
.
Ensure you have the URL Rewrite feature added. In IIS manager configure the following in the URL rewrite section.
Matches the pattern
Wildcards
*
Conditions
{HTTPS}
Matches the pattern
off
Action
Redirect
https://{HTTP_HOST}{REQUEST_URI}
Checked
Found (302)
Once you have done this. Create a condition.
{QUERY_STRING}
Matches the Pattern
off
Essentially it should look like this:
All traffic using a http request will be automatically redirected to the https port.