IIS 10 issues an internal error when attempting to redirect to HTTPS

I've seen tons of resources for setting up HTTP to HTTPS redirection, but it still does not seem to work. With IIS10 and the URL Rewrite module, here are my steps:

  1. I generated a self-signed SSL certificate (this part is self-explanatory and I think he does not need attention)
  2. I added a new binding to port 443 for HTTPS and told him to use the certificate generated in step 1.
  3. I have set my rules as shown in the picture below.

redirection rule

Browsing this page displays the general IIS message "Internal Error". IIS logs say that this is a 404 error when you try to access the IP address on the default port 80. If you go directly to port 443, this works fine, it just does not redirect automatically. I'm not really sure what I'm doing wrong here.

It might be worth considering using PHP, but I do not think that affects anything in this case.