web.configに次のURL書き換えコードがあります
.htm を brand.aspx に転送したいと考えています。
誰かが入力した場合
test1.htm
test2.htm
test3.htm
brand.aspx に移動します。ただし、サーバーに実際のファイル コール「test1.htm」がある場合、次の URL 書き換えは機能し、brand.aspx にリダイレクトされます。ファイルが存在しない場合は、brand.aspx にリダイレクトする代わりに 404 を返します。理由を知っている人はいますか?どうもありがとう。
<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>