RewriteOptionsExtensions.AddRedirect RewriteOptionsExtensions.AddRedirect RewriteOptionsExtensions.AddRedirect Method

Definition

Overloads

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

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

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

public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirect (this Microsoft.AspNetCore.Rewrite.RewriteOptions options, string regex, string replacement);
static member AddRedirect : Microsoft.AspNetCore.Rewrite.RewriteOptions * string * string -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRedirect (options As RewriteOptions, regex As String, replacement As String) As RewriteOptions

Parameters

regex
String String String

The regex string to compare with.

replacement
String String String

If the regex matches, what to replace the uri with.

Returns

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

public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirect (this Microsoft.AspNetCore.Rewrite.RewriteOptions options, string regex, string replacement, int statusCode);
static member AddRedirect : Microsoft.AspNetCore.Rewrite.RewriteOptions * string * string * int -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRedirect (options As RewriteOptions, regex As String, replacement As String, statusCode As Integer) As RewriteOptions

Parameters

regex
String String String

The regex string to compare with.

replacement
String String String

If the regex matches, what to replace the uri with.

statusCode
Int32 Int32 Int32

The status code to add to the response.

Returns

Applies to