I have a site setup to use SSL certs and serve the site via https. However, I cannot get URL Rewrite to work properly to redirect attempted connection attempts to follow certain rules that will, in the end, result to a specific url being used.
For security reasons at this time, I will just say the domain is: example.com
What I am trying to do is the following.
- All rewrites should rewrite the base request to https://www.example.com/
For example, lets say I have these before/afters:
- Before: http://example.com/
- After: https://www.example.com/
- Before: http://example.com/hello/
- After: https://www.example.com/hello/
- Before: http://sub.example.com/
- After: https://sub.example.com/
And so on. However, no matter what example I use I can find online to perform HTTP to HTTPS redirects, I am left with IIS just causing infinite loops redirecting and never properly working.
Bindings on the site in IIS are as follows:
- Type: http / Host Name: www.example.com / Port: 80 / IP Address: *
- Type: http / Host Name: example.com / Port: 80 / IP Address: *
- Type: https / Host Name: www.example.com / Port: 443 / IP Address: *