示例#1
0
        public static RewriteOptions AddRedirectToWww(this RewriteOptions rewriteOptions)
        {
            RedirectWwwRule redirectWwwRule = new RedirectWwwRule()
            {
                StatusCode = (int)HttpStatusCode.Redirect
            };

            return(rewriteOptions.Add(redirectWwwRule));
        }
示例#2
0
        public static RewriteOptions AddRedirectToWwwPermanent(this RewriteOptions rewriteOptions)
        {
            RedirectWwwRule redirectWwwRule = new RedirectWwwRule()
            {
                StatusCode = (int)HttpStatusCode.MovedPermanently
            };

            return(rewriteOptions.Add(redirectWwwRule));
        }