add Element for httpRedirect [IIS Settings Schema]
Note
For more information about the add element, see the following topic on the Microsoft IIS.net Web site: Adding HTTP Wildcard Redirects <add>.
Adds a wildcard redirection rule to the collection of redirection rules.
Note
If you add wildcard redirection rules, you must remove the default destination value in the httpRedirect section in order for the wildcard rules to work.
Syntax
Attributes and Elements
The following sections describe attributes, child elements, and parent elements for this section.
Attributes
Attribute |
Description |
---|---|
destination |
Required string attribute. Specifies a location to which to redirect requests that match the related wildcard value. |
wildcard |
Required string attribute. Specifies a unique wildcard value to which requests are compared. A request is then redirected to the specified destination if the request matches the wildcard value. |
Child Elements
None.
Parent Elements
Element |
Description |
---|---|
configuration |
Specifies the root element in every configuration file that is used by IIS 7. |
system.webServer |
Specifies the top-level section group (in ApplicationHost.config) in which this element is defined. |
httpRedirect |
Configures settings for redirecting client requests to a new location. |
Remarks
For more information about the add element, see the following topic on the Microsoft IIS.net Web site: Adding HTTP Wildcard Redirects <add>.
Element Information
Configuration locations |
Machine.config ApplicationHost.config Root application Web.config Application Web.config Directory Web.config |
Requirements |
Microsoft Internet Information Services (IIS) version 7.0 |