RewriteOptionsExtensions.AddRedirect Metoda

Definice

Přetížení

AddRedirect(RewriteOptions, String, String)

Přesměrovat požadavek, pokud regulární výraz odpovídá PathString HttpContext

AddRedirect(RewriteOptions, String, String, Int32)

Přesměrovat požadavek, pokud regulární výraz odpovídá PathString HttpContext

AddRedirect(RewriteOptions, String, String)

Přesměrovat požadavek, pokud regulární výraz odpovídá PathString HttpContext

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRedirect(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options, System::String ^ regex, System::String ^ replacement);
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

Parametry

options
RewriteOptions

Hodnota RewriteOptions

regex
String

Řetězec regulárního výrazu pro porovnání.

replacement
String

Pokud regulární výraz odpovídá, nahraďte identifikátor URI parametrem.

Návraty

RewriteOptions

Možnosti přepsání.

Platí pro

AddRedirect(RewriteOptions, String, String, Int32)

Přesměrovat požadavek, pokud regulární výraz odpovídá PathString HttpContext

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRedirect(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options, System::String ^ regex, System::String ^ replacement, int statusCode);
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

Parametry

options
RewriteOptions

Hodnota RewriteOptions

regex
String

Řetězec regulárního výrazu pro porovnání.

replacement
String

Pokud regulární výraz odpovídá, nahraďte identifikátor URI parametrem.

statusCode
Int32

Stavový kód, který se má přidat do odpovědi.

Návraty

RewriteOptions

Možnosti přepsání.

Platí pro