HttpRedirect Metabase Property

Applies To: Windows Server 2003, Windows Server 2003 with SP1

The HttpRedirect property specifies the directory or URL to which a client is redirected when attempting to access a specific resource. There are two general forms that the value for this property can take.

The simple format is Destination,Flag.

  • Where Destination can specify either a URL or a virtual path to a file.

  • Where Flag can have one of four values:

  • EXACT_DESTINATION indicates that the value provided for Destination should be considered an absolute target location.

  • CHILD_ONLY indicates that the value should be added to the beginning of the file name of the request to be redirected.

  • PERMANENT indicates that this redirection is permanent for this resource.

  • TEMPORARY indicates that this redirection is temporary for this resource.

The more complex form involves the use of wildcards. The format is *; Wildcard1; Destination1; Wildcard2; Destination2, Flag. Each Wildcard; Destination pair indicates that requests matching the wildcard are redirected to the specified destination. Flag can have the same values as the simple string format.

Important

Setting HttpRedirect at the site or service level has no affect.

Attribute Name Attribute Value

XML Data Type

String

WMI Data Type

String

ADSI Data Type

String

ABO Data Type

String

ABO Metabase Identifier

MD_HTTP_REDIRECT

Attributes

INHERIT

Default Value

null

MetaFlagsEx

CACHE_PROPERTY_MODIFIED

User Type

IIS_MD_UT_FILE

ID

6011

Configurable Locations

You can configure this property at the following locations in the IIS metabase.

Metabase Path IIS Admin Object Type

/LM/W3SVC/n/ROOT /LM/W3SVC/n/ROOT/virtual_directory_name

IIsWebVirtualDir

/LM/W3SVC/n/ROOT/file_name /LM/W3SVC/n/ROOT/virtual_directory_name/file_name

IIsWebFile

/LM/W3SVC/n/ROOT/physical_directory_name /LM/W3SVC/n/virtual_directory_name/physical_directory_name

IIsWebDirectory

Code Example

For general code examples, see Code Examples to Configure Metabase Properties.