Gets the HTTP redirect settings for a website or virtual directory/application under a website.
Get-IisHttpRedirect [-SiteName] <String> [[-VirtualPath] <String>] [<CommonParameters>]
Returns a Carbon.Iis.HttpRedirectConfigurationSection
object for the given HTTP redirect settings. The object contains the following properties:
True
if the redirect is enabled, False
otherwise.True
if redirects are to destination, regardless of the request path. This will send all requests to Destination
.True
if redirects are only to content in the destination directory (not subdirectories).Beginning with Carbon 2.0.1, this function is available only if IIS is installed.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
SiteName | String | The site's whose HTTP redirect settings will be retrieved. |
true | false | |
VirtualPath | String | The optional path to a sub-directory under |
false | false |
Carbon.Iis.HttpRedirectConfigurationSection.
Get-IisHttpRedirect -SiteName ExampleWebsite
Gets the redirect settings for ExampleWebsite.
Get-IisHttpRedirect -SiteName ExampleWebsite -Path MyVirtualDirectory
Gets the redirect settings for the MyVirtualDirectory virtual directory under ExampleWebsite.