共用方式為


RewriteOptionsExtensions.AddRedirectToHttpsPermanent(RewriteOptions) 方法

定義

如果傳入要求為 HTTP,請將要求重新導向至 HTTPs,並傳回 301 狀態碼以永久重新導向。

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

參數

傳回

適用於