Hi all,
I have a site done in asp and url rewritten rules from a db provider. I works fine but I have an annoying issue I've not been able to solve correctly.
The rewritten rules work as follows:
www.mydomain.com/default.asp --> www.mydomain.com/lang
www.mydomain.com/content.asp?id=1 --> www.mydomain.com/lang/category-title
www.mydomain.com/content.asp?id=1&ref=2 --> www.mydomain.com/lang/category-title/content-title
The rules are:
<rules><clear /><rule name="dbp_Redirect" enabled="true" stopProcessing="true"><match url="(.*)" /><conditions logicalGrouping="MatchAll" trackAllCaptures="false"><add input="{DB:{R:1}?{QUERY_STRING}}" pattern="(.+)" /></conditions><action type="Redirect" url="{C:1}" appendQueryString="false" logRewrittenUrl="false" /></rule><rule name="dbp_Reverse" enabled="true" stopProcessing="true"><match url="(.*)" /><conditions><add input="{DB_rewrite:{R:1}}" pattern="(.+)" /></conditions><action type="Rewrite" url="{C:1}" logRewrittenUrl="false" /></rule></rules><outboundRules><clear /><rule name="Outbounddbp_Reverse" preCondition="ResponseIsHtml1" enabled="true"><match filterByTags="A" pattern="^(.*/)(.*)" ignoreCase="true" /><conditions logicalGrouping="MatchAll" trackAllCaptures="true"><add input="{DB_outbound:{R:2}}" matchType="Pattern" pattern="(.+)" ignoreCase="true" negate="false" /></conditions><action type="Rewrite" value="{C:0}" /></rule><preConditions><preCondition name="ResponseIsHtml1"><add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /></preCondition></preConditions></outboundRules>
The problem is that when the user gets to www.mydomain.com/lang/category-title/content-title page all the links rewritten in this page goes like this:
www.mydomain.com/lang/category-title/content-title/lang/category-title/content-title
(as you can see the "lang/category-title/content-title" is repeated twice)
Sure I'm missing something in the rules but I cannot see what it is.
Any help would be appreciated.