I have the following rules to redirect a.aspx?id=99 to a/99 and rewrite a/99 to a.aspx?id=99. It works. The SiteMapPath for the page does not render if the url for SiteMapNode is a, but it does if it is a.aspx.
In other pages where there is no querystring in the url, I can use pagename as the SiteMapNode url or pagename.aspx - both work.
Why doesn't SiteMapPath render if the url for SitMapNode is a?
<rule name="Redirect" stopProcessing="false" >
<match url="^a.aspx$" ignoreCase="true" />
<conditions>
<add input="{QUERY_STRING}" pattern="id=" />
<add input="{QUERY_STRING}" pattern="([0-9]+)" />
</conditions>
<action type="Redirect"
url="http://{HTTP_HOST}/a/{C:1}"
appendQueryString="false"
redirectType="Permanent" />
</rule>
<rule name="Rewrite" stopProcessing="true">
<match url="^a/([0-9]+)$" ignoreCase="true" />
<action type="Rewrite"
url="a.aspx?id={R:1}"
appendQueryString="false"
redirectType="Permanent"/>
</rule>
Web.sitemap entry:
<siteMapNode title="Order Details"
description="Order Details"
url="~/a.aspx" />