RewriteOptions RewriteOptions RewriteOptions Class

Definition

Options for the RewriteMiddleware

public class RewriteOptions
type RewriteOptions = class
Public Class RewriteOptions
Inheritance
RewriteOptionsRewriteOptionsRewriteOptions

Constructors

RewriteOptions() RewriteOptions() RewriteOptions()

Properties

Rules Rules Rules

A list of IRule that will be applied in order upon a request.

StaticFileProvider StaticFileProvider StaticFileProvider

Gets and sets the File Provider for file and directory checks. Defaults to WebRootFileProvider

Extension Methods

AddApacheModRewrite(RewriteOptions, IFileProvider, String) AddApacheModRewrite(RewriteOptions, IFileProvider, String) AddApacheModRewrite(RewriteOptions, IFileProvider, String)

Add rules from an Apache mod_rewrite file

AddApacheModRewrite(RewriteOptions, TextReader) AddApacheModRewrite(RewriteOptions, TextReader) AddApacheModRewrite(RewriteOptions, TextReader)

Add rules from an Apache mod_rewrite file

AddIISUrlRewrite(RewriteOptions, IFileProvider, String) AddIISUrlRewrite(RewriteOptions, IFileProvider, String) AddIISUrlRewrite(RewriteOptions, IFileProvider, String)

Add rules from a IIS config file containing Url Rewrite rules

AddIISUrlRewrite(RewriteOptions, TextReader) AddIISUrlRewrite(RewriteOptions, TextReader) AddIISUrlRewrite(RewriteOptions, TextReader)

Add rules from a IIS config file containing Url Rewrite rules

Add(RewriteOptions, IRule) Add(RewriteOptions, IRule) Add(RewriteOptions, IRule)

Adds a rule to the current rules.

Add(RewriteOptions, Action<RewriteContext>) Add(RewriteOptions, Action<RewriteContext>) Add(RewriteOptions, Action<RewriteContext>)

Adds a rule to the current rules.

AddRedirect(RewriteOptions, String, String) AddRedirect(RewriteOptions, String, String) AddRedirect(RewriteOptions, String, String)

Redirect the request if the regex matches the HttpContext's PathString

AddRedirect(RewriteOptions, String, String, Int32) AddRedirect(RewriteOptions, String, String, Int32) AddRedirect(RewriteOptions, String, String, Int32)

Redirect the request if the regex matches the HttpContext's PathString

AddRedirectToHttps(RewriteOptions) AddRedirectToHttps(RewriteOptions) AddRedirectToHttps(RewriteOptions)

Redirect a request to https if the incoming request is http

AddRedirectToHttps(RewriteOptions, Int32) AddRedirectToHttps(RewriteOptions, Int32) AddRedirectToHttps(RewriteOptions, Int32)

Redirect a request to https if the incoming request is http

AddRedirectToHttps(RewriteOptions, Int32, Nullable<Int32>) AddRedirectToHttps(RewriteOptions, Int32, Nullable<Int32>) AddRedirectToHttps(RewriteOptions, Int32, Nullable<Int32>)

Redirect a request to https if the incoming request is http

AddRedirectToHttpsPermanent(RewriteOptions) AddRedirectToHttpsPermanent(RewriteOptions) AddRedirectToHttpsPermanent(RewriteOptions)

Redirect a request to https if the incoming request is http, with returning a 301 status code for permanently redirected.

AddRedirectToWww(RewriteOptions) AddRedirectToWww(RewriteOptions) AddRedirectToWww(RewriteOptions)

Redirect the request to the www subdomain if the incoming request is non-www.

AddRedirectToWww(RewriteOptions, Int32) AddRedirectToWww(RewriteOptions, Int32) AddRedirectToWww(RewriteOptions, Int32)

Redirect the request to the www subdomain if the incoming request is non-www.

AddRedirectToWwwPermanent(RewriteOptions) AddRedirectToWwwPermanent(RewriteOptions) AddRedirectToWwwPermanent(RewriteOptions)

Permanently redirects the request to the www subdomain if the request is non-www.

AddRewrite(RewriteOptions, String, String, Boolean) AddRewrite(RewriteOptions, String, String, Boolean) AddRewrite(RewriteOptions, String, String, Boolean)

Adds a rule that rewrites the path if the regex matches the HttpContext's PathString.

Applies to