This is the rewrite rule:
<rewrite>
<rules>
<rule name="redirect all requests" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}"
matchType="IsFile"
negate="true"
pattern=""
ignoreCase="false" />
</conditions>
<action type="Rewrite" url="index.html" appendQueryString="true" />
</rule>
</rules>
</rewrite>
Both of the following files exist. One GET succeeds and the other throws a 500.
200
GET http://greenearth.game/node_modules/aurelia-leaflet/dist/amd/leaflet.js
500 (URL Rewrite Module Error.)
GET http://greenearth.game/node_modules/aurelia-open-id-connect/dist/amd/open-id-connect-role-filter.js
The 500 error specifically is:
"Cannot add duplicate collection entry of type 'rule' with unique key attribute 'name' set to 'redirect all requests'".
Two questions:
- Why is the first file giving a 500?
- How can we make it a 200?
Putting <remove name="redirect all requests" />
at the top of the <rules>
element answers #2 but not #1.