RewriteOptionsExtensions.AddRedirectToHttps 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddRedirectToHttps(RewriteOptions) |
如果連入要求為 HTTP,將要求重新導向至 HTTPs |
AddRedirectToHttps(RewriteOptions, Int32) |
如果連入要求為 HTTP,將要求重新導向至 HTTPs |
AddRedirectToHttps(RewriteOptions, Int32, Nullable<Int32>) |
如果連入要求為 HTTP,將要求重新導向至 HTTPs |
AddRedirectToHttps(RewriteOptions)
如果連入要求為 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
參數
- options
- RewriteOptions
傳回
適用於
AddRedirectToHttps(RewriteOptions, Int32)
如果連入要求為 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
參數
- options
- RewriteOptions
- statusCode
- Int32
要新增至回應的狀態碼。
傳回
適用於
AddRedirectToHttps(RewriteOptions, Int32, Nullable<Int32>)
如果連入要求為 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
參數
- options
- RewriteOptions
- statusCode
- Int32
要新增至回應的狀態碼。