public static string ChangeToCssHost(this string virtuelpath)
 {
     if (_isLocal || WebAppSettings.Get().OptimzeUrl == false)
     {
         return(virtuelpath);
     }
     else
     {
         return(virtuelpath);
     }
 }
    public static string ChangeToJsHost(this string virtuelpath)
    {
        string fileGzType = null;

        if (AcceptGzip())
        {
            fileGzType = ".gz";
        }

        if (_isLocal || WebAppSettings.Get().OptimzeUrl == false)
        {
            return(GetSiteRoot() + "/" + VirtualPathUtility.MakeRelative("~/", virtuelpath));
        }
        else
        {
            AmazonUploadContent(virtuelpath);

            Uri    path = new Uri(GetSiteRoot() + "/" + VirtualPathUtility.MakeRelative("~/", virtuelpath));
            string q    = path.Query;
            string qp   = HttpUtility.ParseQueryString(q).Get("p");

            return(P + "d2eiw75x9n1bsg.cloudfront.net/" + virtuelpath.Remove(0).GetHashCode() + "-" + context.Server.UrlEncode(qp) + ".js" + fileGzType);
        }
    }