IIS URL rewrite single site to HTTPS

It took a whill to find it…

My goal was to redirect a specific url to https!
I have one IIS site that has multiple urls. The IIS site has two bindings types *:80 and *:443, and the 443 binding contains a certificate for www.site1.ext.
In the DNS I pointed multiple urls to that IIS site for example: www.site1.ext, sub.site1.ext, www.site2.ext. And only www.site1.ext must be redirected to HTTPS. You can do that with IIS url rewrite module.

All articles that I could find are redirecting ALL incoming requests to https. But that is not what I want. My goal was to redirect just one url from that site to HTTPS.

You can do that like this:

 

About the Author

Sander

No Comments

Comments are closed.