I have IIS 7.5 and want to rewrite some urls pattern is: urls like /img/[TEXT].html should be rewritten to /pages/Default.aspx?file=[TEXT].jpg
I try to do it:
<rule name="My Rule">
<match url="/jpg/(.+)\.html" />
<action type="Rewrite" url="/pages/Default.aspx?file={R:1}.jpg" />
</rule>
but it does not work. Why and how to do it correctly?
I found solution of my problem. This code really works, but checking tool, included to IIS, says that pattern is not matched by unknown reasons!