SPUtility.RebaseUri method
SharePoint 2013
Takes an old Url base, a new Url base and replaces old with new in the original URL.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Takes an old Url base, a new Url base and replaces old with new in the original URL.