Compartir a través de


RewriteOptionsExtensions.AddRedirect Método

Definición

Sobrecargas

AddRedirect(RewriteOptions, String, String)

Redirigir la solicitud si la expresión regular coincide con pathString de HttpContext

AddRedirect(RewriteOptions, String, String, Int32)

Redirigir la solicitud si la expresión regular coincide con pathString de HttpContext

AddRedirect(RewriteOptions, String, String)

Source:
RewriteOptionsExtensions.cs
Source:
RewriteOptionsExtensions.cs
Source:
RewriteOptionsExtensions.cs

Redirigir la solicitud si la expresión regular coincide con pathString de 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

Cadena regex con la que se va a comparar.

replacement
String

Si la expresión regular coincide, por lo que se va a reemplazar el URI.

Devoluciones

Opciones de reescritura.

Se aplica a

AddRedirect(RewriteOptions, String, String, Int32)

Source:
RewriteOptionsExtensions.cs
Source:
RewriteOptionsExtensions.cs
Source:
RewriteOptionsExtensions.cs

Redirigir la solicitud si la expresión regular coincide con pathString de 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

Cadena regex con la que se va a comparar.

replacement
String

Si la expresión regular coincide, por lo que se va a reemplazar el URI.

statusCode
Int32

Código de estado que se va a agregar a la respuesta.

Devoluciones

Opciones de reescritura.

Se aplica a