public static string GetAbsoluteUrl(this IRequest httpReq, string url) { if (url?.SafeSubstring(0, 2) == "~/") { url = httpReq.GetBaseUrl().CombineWith(url.Substring(2)); } return url; }