This is what i'm having trouble with.
The outbound rules that work with regular attributes do not work with custom tags
for example
if i have <img src="/images/misc/something.jpg" data-src="/images/misc/somethingelse.jpg" />
the outbound rule will rewrite this as
<img src="http://mycdn.com/images/misc/something.jpg" data-src="/images/misc/somethingelse.jpg" />
notice that the data-src attribute is not modified even tough my custom tag was supposed to take care of it with the<tag name="img" attribute="data-src" /> part
Similarly
Doesn't work
<li data-bg-img="/Images/splash-screen/splash-home-2.jpg" class="splashli" style="background-color:#e79421;">
Doesn't work
<li class="splashli" style="background-color:#e79421;" imgsrc="/Images/splash-screen/splash-home-2.jpg" >
Works!!!!!!!!
<li imgsrc="/Images/splash-screen/splash-home-2.jpg" class="splashli" style="background-color:#e79421;">
is rewritten as
<li imgsrc="http://mycdn.com/Images/splash-screen/splash-home-2.jpg" class="splashli" style="background-color:#e79421;">
What has changed? i moved the imgsrc attribute from being the last to being the first attribute of the <li> tag.
However notice that this has no effect with attributes that have hyphens. i.e. "data-bg-img"
judging from this post, i'm beginning to think there're some bugs with urlrewrite module and they still haven't been fixed since 2009. Any word on how to fix this? aside from ding filterbytag="none"
which is a big performance hit. I've tried failed request tracing and i can't find anything wrong.
here're the outbound rules.
<outboundRules><clear /><rule name="Out_Rewrite_cdn_http" preCondition="ResponseIsHtml" enabled="true" stopProcessing="true"><match filterByTags="A, Img, Link, Script, CustomTags" customTags="imgDataSrc" pattern="^/(Images(?!(/cart-item|/uploads))|Scripts|Styles)/(.*)$" /><action type="Rewrite" value="http://mycdn.com{R:0}" /></rule><preConditions><preCondition name="ResponseIsHtml"><add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /><add input="{URL}" pattern="\.axd.*$" negate="true" /><add input="{URL}" pattern="\.ashx.*$" negate="true" /></preCondition></preConditions><customTags><tags name="imgDataSrc"><tag name="img" attribute="data-src" /><tag name="li" attribute="data-bg-img" /><tag name="li" attribute="imgsrc" /></tags></customTags></outboundRules>