public static string StripHostFromUrl(string url)
{
string fullHost = string.Format("{0}://{1}", HttpContext.Current.Request.Url.Scheme, Config.CurrentBlog.Host);
if(url.StartsWith(fullHost))
{
// use Length b/c we want to leave the beginning "/" character on newUrl
url = url.Substring(fullHost.Length);
//Remove port number is present
if (url.StartsWith(":"))
{
int firstSlash = url.IndexOf('/');
url = url.Substring(firstSlash, url.Length - firstSlash);
}
}
return url;
}