Partager via


RewriteOptionsExtensions.AddRedirect Méthode

Définition

Surcharges

AddRedirect(RewriteOptions, String, String)

Rediriger la requête si l’expression régulière correspond à la chaîne pathString de HttpContext

AddRedirect(RewriteOptions, String, String, Int32)

Rediriger la requête si l’expression régulière correspond à la chaîne pathString de HttpContext

AddRedirect(RewriteOptions, String, String)

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

Rediriger la requête si l’expression régulière correspond à la chaîne 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

Paramètres

options
RewriteOptions

L’RewriteOptionsopérateur

regex
String

Chaîne regex à comparer.

replacement
String

Si l’expression régulière correspond, à quoi remplacer l’URI.

Retours

Options de réécriture.

S’applique à

AddRedirect(RewriteOptions, String, String, Int32)

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

Rediriger la requête si l’expression régulière correspond à la chaîne 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

Paramètres

options
RewriteOptions

L’RewriteOptionsopérateur

regex
String

Chaîne regex à comparer.

replacement
String

Si l’expression régulière correspond, à quoi remplacer l’URI.

statusCode
Int32

Le code status à ajouter à la réponse.

Retours

Options de réécriture.

S’applique à