Example #1
0
        /// <summary>
        /// 是否是外部链接
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public static Boolean IsOutUrl(String url)
        {
            Boolean isFull = IsFullUrl(url);

            if (!isFull)
            {
                return(false);
            }
            String targetHost = new UriBuilder(url).Host;

            if (targetHost.Equals(SystemInfo.HostNoSubdomain))
            {
                return(false);
            }
            if (targetHost.IndexOf(SystemInfo.HostNoSubdomain) >= 0)
            {
                return(false);
            }
            return(true);
        }
Example #2
0
        /// <summary>
        /// �Ƿ����ⲿ����
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public static Boolean IsOutUrl( String url )
        {
            Boolean isFull = IsFullUrl( url );
            if (!isFull) return false;

            String targetHost = new UriBuilder( url ).Host;

            if (targetHost.Equals( SystemInfo.HostNoSubdomain )) return false;
            if (targetHost.IndexOf( SystemInfo.HostNoSubdomain ) >= 0) return false;
            return true;
        }