We recently replaced most of our default pages from default.htm to default.asp.
Rewrite rules work fine if it's a sub-folder, e.g. example.com/help/default.asp where the default.htm was deleted. If I type domain.com/help/default.htm, it correctly shows the new .asp page and no 404 because the default.htm no longer exists.
At the root entering example.com/default.htm does not redirect to default.asp instead sending the user to the 404 page we created.
Tried exact match vs. wildcard, no difference.
Why the 404 and no redirect?
<rule name="homepage" patternSyntax="Wildcard" stopProcessing="true">
<match url="*example.com/default.htm" ignoreCase="true" />
<action type="Redirect" url="http://www.example.com/default.asp" redirectType="Permanent" />
</rule>
UPDATE: This works on a subfolder redirect from htm to asp:
<rule name="downloadhome" patternSyntax="Wildcard" stopProcessing="true">
<match url="*download/default.htm" ignoreCase="true" />
<action type="Redirect" url="/download/default.asp" redirectType="Permanent" />
</rule>