I tried to make http automaticlly redirect to https.
I exactly followed those steps: https://www.namecheap.com/support/knowledgebase/article.aspx/9953/38/iis-redirect-http-to-https
This is my web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="SSL Redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
The error I get when visiting the site is ERR_TOO_MANY_REDIRECTS