Bagikan melalui


RewriteOptionsExtensions.AddRewrite Metode

Definisi

Menambahkan aturan yang menulis ulang jalur jika regex cocok dengan PathString 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

Parameter

regex
String

String regex untuk dibandingkan.

replacement
String

Jika regex cocok, apa yang harus diganti dengan uri.

skipRemainingRules
Boolean

Jika regex cocok, hentikan pemrosesan aturan lain secara kondisional.

Mengembalikan

Opsi Penulisan Ulang.

Berlaku untuk