IIS7 URL Rewrite - Rewrite CSS files
- by user1231958
I'm trying to rewrite certain CSS files with some rules, so it replaces every single instance of links in the CSS (as in background: url("/myuri.jpg")) with a prefix (as in background: url("/zeus/myuri.jpg"))
These are the rules.
<rule name="ReverseProxyOutboundRule2" preCondition="IsCSS" enabled="true" stopProcessing="false">
<match filterByTags="None" pattern="url\("(.*)"\)" />
<action type="Rewrite" value="url("/zeus{R:1}")" />
<conditions>
<add input="{URL}" pattern="/zeus" />
</conditions>
</rule>
<preCondition name="IsCSS">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/css" />
</preCondition>
However, only one url is being replaced this way and somehow the rest is being ignored.
Thank you beforehand.