I have the following url rewrite code in my web.config
I want to forward anything .htm to the brand.aspx.
so if anyone type in
test1.htm
test2.htm
test3.htm
would go to the brand.aspx. However, the following url rewrite would work if there is an actual file call "test1.htm" in the server, then it will redirect to the brand.aspx. If there is no file exists, it will just return 404 instead of redirect to the brand.aspx. Does anybody know why? thanks a lot.
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="test" stopProcessing="false">
<match url="(.*)\.htm$" ignoreCase="true" />
<action type="Rewrite" url="brand.aspx" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>