We are experiencing an issue with an asp.net application (using .Net Framework 4.5.2) where links in pages are being modified and it causes issues in our application. We are using the rewriter to strip out the url prefix we use to identify user/version/name so that the server can find the actual resource.
My understanding is that the rewriter runs before any iis handlers, and therefore should not be modifying any page content in the response unless Outbound rules are used. We have links in many pages, such as anchor tags with relative urls. For example:
mypage.aspx
is transformed to
../../../../mypage.aspx
We are using the following rules, which act to strip out the url prefix we add to the actual url.
<rewrite>
<rules>
<clear />
<rule name="Rewrite1" enabled="true" stopProcessing="true">
<match url="^V1/\w+(?=/)/\w+(?=/)/(.+)" />
<conditions logicalGrouping="MatchAll" />
<action type="Rewrite" url="/{R:1}" />
</rule>
<rule name="Rewrite2" enabled="true" stopProcessing="true">
<match url="^(.*)V1/\w+(?=/)/\w+(?=/)/(.+)" negate="false" />
<conditions logicalGrouping="MatchAny" />
<action type="Rewrite" url="/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
As far as I can tell from the documentation, these inbound rules should not be modifying content in the response. I need to know how to prevent this behavior.
Please advise
Regards