Hello,
I have an issue with a pattern used in the outbound rewrite rule applied against an encoded JSON response. One pattern works the other does not. Patterns are similar, here is the one that works - pattern="IconUrl%22:%22/_layouts/images/ES/inc/hbico-home.png%22" and here is the one that does not work - pattern="GoToUrl%22:%22/%22"
Please see a complete rule for each pattern below. Can anyone please tell me what is worng with the pattern that does not work? Thanks
WORKING RULE:
<rewrite>
<outboundRules>
<clear />
<rule name="Rule1" preCondition="IsHTML" enabled="true" patternSyntax="ExactMatch">
<match filterByTags="None" pattern="IconUrl%22:%22/_layouts/images/ES/inc/hbico-home.png%22" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true" />
<action type="Rewrite" value="IconUrl%22:%22/_layouts/images/ES/inc/hbico-home_new.png%22" />
</rule>
<preConditions>
<preCondition name="IsHTML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
NOT WORKING RULE:
<rewrite>
<outboundRules>
<clear />
<rule name="Rule1" preCondition="IsHTML" enabled="true" patternSyntax="ExactMatch">
<match filterByTags="None" pattern="GoToUrl%22:%22/%22" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true" />
<action type="Rewrite" value="GoToUrl%22:%22/_layouts/default.aspx%22" />
</rule>
<preConditions>
<preCondition name="IsHTML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>