From: Elad on
I'm trying to use the URL rewriter 2.0 RC to do outbound rules for my sitemap.

The file name is sitemap.xml , and the content=type is text/xml

I created the following rule:

<rule name="showusers_xml" stopProcessing="true" preCondition="isXML">
<match filterByTags="None"
pattern="(.*)showuser\.aspx\?uid=(.*)$" />
<conditions logicalGrouping="MatchAll" />
<action type="Rewrite" value="{R:1}/users/{R:2}" />
</rule>



and the preCondition is:

preCondition name="isXML" logicalGrouping="MatchAll"
patternSyntax="ECMAScript">
<add input="{RESPONSE_CONTENT_TYPE}"
pattern="^text/xml" />
</preCondition>



But this doesn't work.

The same rule works fine on the HTML preCondition.
Any idea why the rule doesn't run on the XML?
Also - any idea how can I set a preCondition for the outbound to do this
only on a specific file?( {REQUEST-FILE-NAME = "sitemap.xml" ??? or
something?)

Thanks,

Elad