Versions Compared

Key

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

Table of Contents

Overview

The <PathRegex> element is used to apply content rules settings to requests whose path matches a regular expression. The query string, if any, is NOT included in the comparison.

Regular expressions apply to the remainder of the path that is being compared and do not "nest", so if you care what's after the part you're matching, then choose compose your expression to check for thatthe entire match you want.toc

Reference

Attributes

Content Specifiers

Required

Names

Type

TypeReq?Default

Description

regex stringY

Specifies the regular expression to match against.apply

caseSensitive boolean
false

Controls the case option in regex engine.sensitivity option of the regular expression engine

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 

...

Name

Cardinality

Description

<Query>0 or more

Matches requests containing a matching query string parameter satisfying the element.

For more details on how the request mapping process works, see the HowToRequestMap topicHowTo.

Example

As with the example in the <Path> topic, this scenario doesn't actually warrant a separate <Path> element since the "secure/" string could be prefixed to the demonstrated expression.

Code Block
languagexml
<RequestMapper type="Native">
    <RequestMap applicationId="default">
        <Host name="sp.example.org">
            <Path name="secure">
                <!-- Note the reversed ignoreCase setting, see the warning above. -->
                <PathRegex regex="(en|de|it|fr)/create/new/class" ignoreCasecaseSensitive="false" authType="shibboleth" requireSession="true">
                    <AccessControl><NOT><Rule require="affiliation">student</Rule></NOT></AccessControl>
                </PathRegex>
            </Path>
        </Host>
    </RequestMap>
</RequestMapper>

...