Compartilhar via


RewriteOptionsExtensions.AddRewrite Método

Definição

Adiciona uma regra que reescreve o caminho se o regex corresponder ao PathString do 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

A cadeia de caracteres regex com a qual comparar.

replacement
String

Se o regex corresponder, pelo que substituir o uri.

skipRemainingRules
Boolean

Se o regex corresponder, pare condicionalmente o processamento de outras regras.

Retornos

As opções de Reescrita.

Aplica-se a