Bagikan melalui


RewriteOptionsExtensions.AddRedirect Metode

Definisi

Overload

AddRedirect(RewriteOptions, String, String)

Alihkan permintaan jika regex cocok dengan PathString HttpContext

AddRedirect(RewriteOptions, String, String, Int32)

Alihkan permintaan jika regex cocok dengan PathString HttpContext

AddRedirect(RewriteOptions, String, String)

Sumber:
RewriteOptionsExtensions.cs
Sumber:
RewriteOptionsExtensions.cs
Sumber:
RewriteOptionsExtensions.cs

Alihkan permintaan jika regex cocok dengan PathString 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

Parameter

regex
String

String regex untuk dibandingkan.

replacement
String

Jika regex cocok, apa yang harus diganti dengan uri.

Mengembalikan

Opsi Penulisan Ulang.

Berlaku untuk

AddRedirect(RewriteOptions, String, String, Int32)

Sumber:
RewriteOptionsExtensions.cs
Sumber:
RewriteOptionsExtensions.cs
Sumber:
RewriteOptionsExtensions.cs

Alihkan permintaan jika regex cocok dengan PathString 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

Parameter

regex
String

String regex untuk dibandingkan.

replacement
String

Jika regex cocok, apa yang harus diganti dengan uri.

statusCode
Int32

Kode status untuk ditambahkan ke respons.

Mengembalikan

Opsi Penulisan Ulang.

Berlaku untuk