共用方式為


RewriteOptionsExtensions.AddRedirectToHttps 方法

定義

多載

AddRedirectToHttps(RewriteOptions)

如果連入要求為 HTTP,將要求重新導向至 HTTPs

AddRedirectToHttps(RewriteOptions, Int32)

如果連入要求為 HTTP,將要求重新導向至 HTTPs

AddRedirectToHttps(RewriteOptions, Int32, Nullable<Int32>)

如果連入要求為 HTTP,將要求重新導向至 HTTPs

AddRedirectToHttps(RewriteOptions)

來源:
RewriteOptionsExtensions.cs
來源:
RewriteOptionsExtensions.cs
來源:
RewriteOptionsExtensions.cs

如果連入要求為 HTTP,將要求重新導向至 HTTPs

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRedirectToHttps(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options);
public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToHttps (this Microsoft.AspNetCore.Rewrite.RewriteOptions options);
static member AddRedirectToHttps : Microsoft.AspNetCore.Rewrite.RewriteOptions -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRedirectToHttps (options As RewriteOptions) As RewriteOptions

參數

傳回

適用於

AddRedirectToHttps(RewriteOptions, Int32)

來源:
RewriteOptionsExtensions.cs
來源:
RewriteOptionsExtensions.cs
來源:
RewriteOptionsExtensions.cs

如果連入要求為 HTTP,將要求重新導向至 HTTPs

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRedirectToHttps(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options, int statusCode);
public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToHttps (this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode);
static member AddRedirectToHttps : Microsoft.AspNetCore.Rewrite.RewriteOptions * int -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRedirectToHttps (options As RewriteOptions, statusCode As Integer) As RewriteOptions

參數

statusCode
Int32

要新增至回應的狀態碼。

傳回

適用於

AddRedirectToHttps(RewriteOptions, Int32, Nullable<Int32>)

來源:
RewriteOptionsExtensions.cs
來源:
RewriteOptionsExtensions.cs
來源:
RewriteOptionsExtensions.cs

如果連入要求為 HTTP,將要求重新導向至 HTTPs

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRedirectToHttps(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options, int statusCode, Nullable<int> sslPort);
public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToHttps (this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode, int? sslPort);
static member AddRedirectToHttps : Microsoft.AspNetCore.Rewrite.RewriteOptions * int * Nullable<int> -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRedirectToHttps (options As RewriteOptions, statusCode As Integer, sslPort As Nullable(Of Integer)) As RewriteOptions

參數

statusCode
Int32

要新增至回應的狀態碼。

sslPort
Nullable<Int32>

要新增至回應的 SSL 埠。

傳回

適用於