RewriteOptionsExtensions.AddRedirectToNonWww Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddRedirectToNonWww(RewriteOptions, Int32, String[]) |
Redirect the request to the root domain if the incoming request is from the www subdomain. |
AddRedirectToNonWww(RewriteOptions, String[]) |
Redirect the request to the root domain if the incoming request is from the www subdomain. |
AddRedirectToNonWww(RewriteOptions) |
Redirect the request to the root domain if the incoming request is from the www subdomain. |
AddRedirectToNonWww(RewriteOptions, Int32) |
Redirect the request to the root domain if the incoming request is from the www subdomain. |
AddRedirectToNonWww(RewriteOptions, Int32, String[])
- Source:
- RewriteOptionsExtensions.cs
Redirect the request to the root domain if the incoming request is from the www subdomain.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRedirectToNonWww(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options, int statusCode, ... cli::array <System::String ^> ^ domains);
public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWww (this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode, params string[] domains);
static member AddRedirectToNonWww : Microsoft.AspNetCore.Rewrite.RewriteOptions * int * string[] -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRedirectToNonWww (options As RewriteOptions, statusCode As Integer, ParamArray domains As String()) As RewriteOptions
Parameters
- options
- RewriteOptions
The RewriteOptions.
- statusCode
- Int32
The status code to add to the response.
- domains
- String[]
Limit the rule to apply only on the specified domain(s).
Returns
Applies to
AddRedirectToNonWww(RewriteOptions, String[])
- Source:
- RewriteOptionsExtensions.cs
Redirect the request to the root domain if the incoming request is from the www subdomain.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRedirectToNonWww(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options, ... cli::array <System::String ^> ^ domains);
public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWww (this Microsoft.AspNetCore.Rewrite.RewriteOptions options, params string[] domains);
static member AddRedirectToNonWww : Microsoft.AspNetCore.Rewrite.RewriteOptions * string[] -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRedirectToNonWww (options As RewriteOptions, ParamArray domains As String()) As RewriteOptions
Parameters
- options
- RewriteOptions
The RewriteOptions.
- domains
- String[]
Limit the rule to apply only on the specified domain(s).
Returns
Applies to
AddRedirectToNonWww(RewriteOptions)
- Source:
- RewriteOptionsExtensions.cs
Redirect the request to the root domain if the incoming request is from the www subdomain.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRedirectToNonWww(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options);
public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWww (this Microsoft.AspNetCore.Rewrite.RewriteOptions options);
static member AddRedirectToNonWww : Microsoft.AspNetCore.Rewrite.RewriteOptions -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRedirectToNonWww (options As RewriteOptions) As RewriteOptions
Parameters
- options
- RewriteOptions
The RewriteOptions.
Returns
Applies to
AddRedirectToNonWww(RewriteOptions, Int32)
- Source:
- RewriteOptionsExtensions.cs
Redirect the request to the root domain if the incoming request is from the www subdomain.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Rewrite::RewriteOptions ^ AddRedirectToNonWww(Microsoft::AspNetCore::Rewrite::RewriteOptions ^ options, int statusCode);
public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWww (this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode);
static member AddRedirectToNonWww : Microsoft.AspNetCore.Rewrite.RewriteOptions * int -> Microsoft.AspNetCore.Rewrite.RewriteOptions
<Extension()>
Public Function AddRedirectToNonWww (options As RewriteOptions, statusCode As Integer) As RewriteOptions
Parameters
- options
- RewriteOptions
The RewriteOptions.
- statusCode
- Int32
The status code to add to the response.
Returns
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for