Compartilhar via


RewriteOptionsExtensions.AddRedirect Método

Definição

Sobrecargas

AddRedirect(RewriteOptions, String, String)

Redirecionar a solicitação se o regex corresponder ao PathString do HttpContext

AddRedirect(RewriteOptions, String, String, Int32)

Redirecionar a solicitação se o regex corresponder ao PathString do HttpContext

AddRedirect(RewriteOptions, String, String)

Origem:
RewriteOptionsExtensions.cs
Origem:
RewriteOptionsExtensions.cs
Origem:
RewriteOptionsExtensions.cs

Redirecionar a solicitação se o regex corresponder ao PathString do 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

Parâmetros

regex
String

A cadeia de caracteres regex com a qual comparar.

replacement
String

Se o regex corresponder, pelo que substituir o uri.

Retornos

As opções de Reescrita.

Aplica-se a

AddRedirect(RewriteOptions, String, String, Int32)

Origem:
RewriteOptionsExtensions.cs
Origem:
RewriteOptionsExtensions.cs
Origem:
RewriteOptionsExtensions.cs

Redirecionar a solicitação se o regex corresponder ao PathString do 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

Parâmetros

regex
String

A cadeia de caracteres regex com a qual comparar.

replacement
String

Se o regex corresponder, pelo que substituir o uri.

statusCode
Int32

O status código a ser adicionado à resposta.

Retornos

As opções de Reescrita.

Aplica-se a