Compartir a través de


RewriteOptionsExtensions.AddRewrite Método

Definición

Agrega una regla que vuelve a escribir la ruta de acceso si la expresión regular coincide con pathString de HttpContext.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRewrite(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options, System::String ^ regex, System::String ^ replacement, bool skipRemainingRules);
public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRewrite (this Microsoft.AspNetCore.Rewrite.RewriteOptions options, string regex, string replacement, bool skipRemainingRules);
static member AddRewrite : Microsoft.AspNetCore.Rewrite.RewriteOptions * string * string * bool -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRewrite (options As RewriteOptions, regex As String, replacement As String, skipRemainingRules As Boolean) 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.

skipRemainingRules
Boolean

Si la expresión regular coincide, detenga condicionalmente el procesamiento de otras reglas.

Devoluciones

Opciones de reescritura.

Se aplica a