ディスクキャッシュ機能とsqldatareaderでImageresizerを使用しようとしています。URL は次の形式であると想定されます。
http://somesite.com/image/ {imageid}.{extension}
一方、私たちのサイトのすべての画像リンクは現在次のとおりです。
http://somesite.com/image.aspx?imageid= {imageid}&format={extension}
これらを変換するためにこれまでに見つけた最良の解決策は UrlRewrite ですが、意図したこととは逆のことを行っています (ナイスな URL を厄介な URL にします)。私はこれに対して正しい書き換え規則を得るのに苦労しており、誰かが助けてくれることを望んでいました. 以下は私が現在持っているものであり、完全に間違っている可能性があることを認識しています。
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^image.aspx?([^imageid=]+)$" ignoreCase="true" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="image/{R:1}.jpg" />
</rule>
</rules>
</rewrite>