RewriteOptionsExtensions.AddRedirectToHttps 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddRedirectToHttps(RewriteOptions) |
如果传入请求为 http,则将请求重定向到 https |
AddRedirectToHttps(RewriteOptions, Int32) |
如果传入请求为 http,则将请求重定向到 https |
AddRedirectToHttps(RewriteOptions, Int32, Nullable<Int32>) |
如果传入请求为 http,则将请求重定向到 https |
AddRedirectToHttps(RewriteOptions)
- Source:
- RewriteOptionsExtensions.cs
- Source:
- RewriteOptionsExtensions.cs
- Source:
- 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
参数
- options
- RewriteOptions
返回
适用于
AddRedirectToHttps(RewriteOptions, Int32)
- Source:
- RewriteOptionsExtensions.cs
- Source:
- RewriteOptionsExtensions.cs
- Source:
- 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
参数
- options
- RewriteOptions
- statusCode
- Int32
要添加到响应的状态代码。
返回
适用于
AddRedirectToHttps(RewriteOptions, Int32, Nullable<Int32>)
- Source:
- RewriteOptionsExtensions.cs
- Source:
- RewriteOptionsExtensions.cs
- Source:
- 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
参数
- options
- RewriteOptions
- statusCode
- Int32
要添加到响应的状态代码。