I've seen similar questions and answers regarding conversions from virtual to absolute and url, but how can I convert a url to a virtual path without manual string parsing?
Example:
I want "http://myserver/home.aspx" converted to: "~/home.aspx"
I realize the above example would be an easy string parsing routine, but I'm looking for a proper solution that will scale to the changing of the url format.