Path

Overview

The <Path> element is used to apply content settings to requests containing a specific path segment at a particular point in the complete path.

Path matching can be nested, and specifying multiple path segments in a single element is also allowed to simplify heavily nested rules. However, path segments in between matched portions cannot be skipped, except by using the <PathRegex> element instead.

Path matching is also greedy. As much of the request's path as possible is consumed during each comparison, and only the remaining portion is used in any subequent nested comparison.

Finally, do not attempt to use a <Path> element with only a "/" character to indicate the root of a virtual host. It will be ignored, and your log will contain a warning. Put any settings that apply to an entire virtual host in the parent <Host> element.

Reference

Attributes

Content Specifiers

Names

Type

Req?

Description

Names

Type

Req?

Description

name 

string

Y

Required, specifies a path segment to match against. Lower case must be used, and case sensitive matching is not supported. Multiple segments can be included by using forward slashes to separate them.

Content Settings

The element supports a large number of XML attributes corresponding to the content settings supported by the SP:

Child Elements

Access Control 

Nested Content Specifiers

Example

The example below demonstrates a couple of different syntaxes, but note that the lack of any settings applied to the "secure" path at the root implies that the nested element could just as easily have been specified as "secure/create/new/class" with the same meaning.

<RequestMapper type="Native"> <RequestMap applicationId="default"> <Host name="sp.example.org"> <!-- Example of a single nested path segment --> <Path name="secure"> <!-- Example of a multiple path segments separated by slashes --> <Path name="/create/new/class" authType="shibboleth" requireSession="true"> <AccessControl><NOT><Rule require="affiliation">student</Rule></NOT></AccessControl> </Path> </Path> </Host> </RequestMap> </RequestMapper>