以下是示例网址:
http://localhost/myapp/images/Loading/bandwidth_States.png
我想重写为:
http://localhost/myapp/images/Loading/bandwidth_States.png?ver=20131014
答案 0 :(得分:0)
我找到了答案:
在web.config中:
<system.webServer>
<rewrite>
<rules>
<rule name="Image Versioning">
<match url="(.*).png" />
<action type="Rewrite" url="{R:0}" appendQueryString="true" />
<conditions>
<add input="{QUERY_STRING}" pattern="ver=20140320" negate="true" />
</conditions>
</rule>
</rules>
</rewrite>
</system.webServer>