I have the following rule in IIS 7:
<rule name="Category" enabled="true">
<match url="^store/([0-9]+)/(.*)" />
<action type="Rewrite" url="store?cid={R:1}" appendQueryString="false" logRewrittenUrl="true" />
</rule>
Which seems to work fine, however in my ASP.Net MVC 3 app I have several @Url.Content("~/") entries which are resolving to /store/ as the root as opposed to /. A typical url would be http://mysite.com/store/99/coats-with-hoods for example.
EDIT/UPDATE: I m still pulling my hair out on this one, so I decided to look into Url.Content code-base and I noticed that it checks if the URL has been re-written (true) and if so it makes the path relevant, which in turn does not give me the absolute URL:
if (!PathHelpers._urlRewriterHelper.WasRequestRewritten(httpContext))
return contentPath;
string relativePath = PathHelpers.MakeRelative(httpContext.Request.Path, contentPath);
return PathHelpers.MakeAbsolute(httpContext.Request.RawUrl, relativePath);
Anyone know why this would be? I m a bit confused as to why this is happening and how I can account for it in my application?