We've recently upgraded our site from .net 2.0 to .net 4.5. For SEO purposes we use ISAPI filters to convert urls which look like this:
MainSite/directory/virginia/richmond.aspx
Into:
MainSite/ProcessLocation.aspx?state=virginia&city=richmond
RewriteRule ^/((?:MainSite_Prod|MainSite)/)?directory/(.*)/(.*)\.aspx /$1ProcessLocation.aspx?state=$2&city=$3 [U]
For our ISAPI processing, we upgraded from Ionic's IsapiRewrite4.dll to IIRF. The rewrite works like it used to, but all relative paths on the page which are processed in the code behind now have the incorrect relative path. For example, setting the following href in the code-behind:
someLink.HRef = "#someLocation";
Now results in the following when the page is constructed:
<a href="../../#someLocation" />
Rather than the desired:
<a href="#someLocation" />
This was not an issue in .net 2.0 and IsapiRewrite4. Does anyone have any ideas how to fix this?
Thanks!