Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

The <Host> element is used to apply content rules settings to requests to specific virtual hosts and/or to act as a container for more specific virtual host (or often to the two virtual hosts running on the default ports).tocrules based on path or query string.

Host matching is based on exact matching of the hostname in a request, and optionally based on scheme or port. For this matching to be reliable, the hostname must be canonical; that is, it must come from the web server's own virtual host configuration rather than a value in the Host header in an HTTP request. Otherwise any rule can be circumvented trivially.

Apache can support this via the UseCanonicalName directive, but this is normally unnecessary because there are better, more powerful ways of handling content settings in Apache itself.

IIS does not support this at all, and reports to applications only the value provided by the client. This is worked around by means of the <Site> element to provide a canonical site to host mapping independently of IIS.

Reference

Attributes

Content Specifiers

Names

Type

Req?

Description

name stringY

Required attribute, specifies the hostname of requests to match against. This must correspond to the "canonical" name of the virtual host, or the client can circumvent the matching process.(see above for the issues with this)

scheme "http",
"https"

Optional scheme of requests to match against. Used to match only requests using a specific protocol. If omitted, any either protocol will be matchedmatch.
port integer
Optional port of requests to match against. Used to match only requests using a specific port. If omitted, any request requests to the default port for the protocol scheme used (either 80 or 443) will be matchedmatch.

Content Settings

The element supports a large number of XML attributes corresponding to request mapper properties are used.the content settings supported by the SP:

Include Page
ContentSettings
ContentSettings

Child Elements

Access Control Control

Include Page
AccessControl
AccessControl

Nested Content Specifiers

Include Page
NativeContentSpecifiersNestedContentSpecifiersNativeContentSpecifiers
NestedContentSpecifiers