I have my site hosted on a subfolder (ApplicationPath). I have ISAPI Rewrite to translate from www.domain.com/Subfolder to www.domain.com. The problem is that asp.net MVC Html.ActionLink() (and similar functions) generates URLS with www.domain.com/Subfolder. I want to be able to remove the "/Subfolder" from the URL as the ISAPI Rewrite will take care of making the link work. How do i do this? Please, i've tried it like a million times with no success.
A:
I don't believe there's a way to do this that is built in to the framework. You'll have to write your own Html helper extension method.
John Sheehan
2009-01-14 23:05:41
A:
I think you should write your own Route class witch will rewrite URIs.
Artem Tikhomirov
2009-01-15 00:02:18
+1
A:
In your route class override the GetVirtualPath method having it add "../" to the beginning of the Url property of the VirtualPathData object returned by the base.GetVirtualPath call.
Sean Lynch
2009-07-02 18:02:03