My domain is: weiland.dk
My web server is: Microsoft-IIS/10.0:
My hosting provider: unoeuro.com
I can login to a root shell on my machine: don’t know
I’m using a control panel to manage my site: no
I’m new to web.config and there seems to be a problem regarding Let’s Encrypt.
I have the following code in web.config:
<rules>
<clear />
<rule name="Allow LetsEncrypt" patternSyntax="Wildcard" stopProcessing="true">
<match url=".well-known/*" />
<action type="None" />
</rule>
<rule name="Redirect non-www OR non-https to https://www">
<match url=".*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^weiland.dk$" />
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://www.weiland.dk/{R:0}" redirectType="Permanent"/>
</rule>
... and some more rules..
</rules>
… then the acme-challenge URL is accessible. But that gives the rest of the website problems. How can I combine the rules, so that at slash is added, but not in the .well-known-folder?
To allow access in IIS 8.5 (and higher) to the “dot” directory is not a problem, but access to a file with NO extension is. Therefore I put this in my web.config file:
Note that the stopProcessing attribute must be the last rule in the <rules> section (top-down) because that prevents any other rules from being processed. Mine are separate tests and could have been combined but I’m too lazy to go in and change it. Pretty sure your regex needs to escape the dot in your URL since that is a wildcard match.