private static void RewriteFilePath(HttpContext context, string url)
{
var awr = Utils.AbsoluteWebRoot;
url = url.ToLower().Replace(awr.ToString().ToLower(), string.Empty).Replace("files/", string.Empty);
url = url.Substring(0, url.LastIndexOf(Path.GetExtension(url) ?? "", StringComparison.Ordinal));
var npath = string.Format("{0}file.axd?file={1}", Utils.ApplicationRelativeWebRoot, url);
context.RewritePath(npath);
}