Beispiel #1
0
        public static RewriteOptions ForceToAppendTrailingSlash(this RewriteOptions options, int statusCode)
        {
            options.AddRedirect("(.*[^/])$", "$1/", statusCode);

            return(options);
        }
Beispiel #2
0
        public static RewriteOptions ForceToStripTrailingSlash(this RewriteOptions options, int statusCode)
        {
            options.AddRedirect("(.*)/$", "$1", statusCode);

            return(options);
        }