title: Convert incoming url to physical path and back again
body: <p>I have a MVC4 project where the server needs to generate a new url based on an incoming url from the client. The calculations run using the physical path. So I need to ..</p>
  
  <pre><code>1. Given an incomming url (eg http://urlPath/filename.html)  
  2. Find the physical directory where this file exists (eg c:/physicalPath/) 
  3. Calc the new filename (eg c:/newPhysicalPath/newfileName.html)
  4. Convert to new url (eg http://newUrlPath/newfilename.html)
  </code></pre>
  
  <p>I'm getting bewildered by all the helper methods and classes for conversion. Can some one help with a non-fragile way of converting both ways (stages 2 and 4)? (I'm doing this in a model and not a view and I am new to C# so please keep it simple).</p>