I've looked at innumerable resources on how to set up a HTTP to HTTPS Redirect, but still it doesn't seem to work. Using IIS10 and the URL Rewrite module, here are my steps:
- I've generated a Self-Signed SSL Cert (this part is self-explanatory and I feel like it doesn't need attention)
- I've added a new binding to port 443 for HTTPS and told it to use the cert generated in step 1.
- I've set my rules as in the picture below.
Browsing to that page gives the generic IIS 'internal error' message. IIS logs say it's a 404 error when trying to access the IP at the default port 80. Going directly to port 443 works fine, it just won't automatically redirect. I'm not really sure what I'm doing wrong here.
It may be worth considering that I'm using PHP, but I don't think that affects anything in this case.