Ejemplo n.º 1
0
        public static bool IsNeedProcess(string absolutePath)
        {
            if (StringUtil.EndsWithIgnoreCase(absolutePath, ".aspx") || StringUtil.EndsWith(absolutePath, '/'))
            {
                return(true);
            }

            UrlFormat urlFormat = AllSettings.Current.FriendlyUrlSettings.UrlFormat;

            switch (urlFormat)
            {
            case UrlFormat.Html:
                return(StringUtil.EndsWithIgnoreCase(absolutePath, ".html"));

            case UrlFormat.Folder:
                string ext = Path.GetExtension(absolutePath);
                return(string.Compare(ext, string.Empty, true) == 0);

            default:
                return(false);
            }
        }