BlogEngine.Core.Web.HttpModules.UrlRewrite.RewriteImagePath C# (CSharp) 메소드

RewriteImagePath() 개인적인 정적인 메소드

Rewrites the incoming image request to the actual handler
private static RewriteImagePath ( HttpContext context, string url ) : void
context System.Web.HttpContext the context
url string the url string
리턴 void
        private static void RewriteImagePath(HttpContext context, string url)
        {
            var awr = Utils.AbsoluteWebRoot;
            url = url.ToLower().Replace(awr.ToString().ToLower(), string.Empty).Replace("images/", string.Empty);
            url = url.Substring(0, url.LastIndexOf(Path.GetExtension(url) ?? "", StringComparison.Ordinal));
            var npath = string.Format("{0}image.axd?picture={1}", Utils.ApplicationRelativeWebRoot, url);
            context.RewritePath(npath);
        }