How to specify selectors in AEM Dispatcher filter rules

✨ This content is AI generated and could be inaccurate. Generative AI Terms

This article explains how to configure selectors like ‘search’ and ‘children’ in Adobe Experience Manager Dispatcher filter rules to properly allow or restrict requests.

Description description

Environment

Adobe Experience Manager (all versions)

Symptoms

There is a need to restrict or allow requests using selectors such as search or children (e.g., URLs like page.search.html or page.children.json) via Dispatcher filter rules. It is unclear whether selectors should be specified with or without the leading dot in the Dispatcher configuration, and how to properly configure these rules.

Example URLs:

  • /content/page.search.html
  • /content/page.children.json

Cause

Dispatcher filter rules match the selector part of the URL without the leading dot. Including the dot will prevent the rule from matching as intended.

Resolution resolution

Follow the steps below to resolve the issue:

  1. In Dispatcher filter rules, do not include the leading dot (.) when specifying selectors in the /selectors property.

  2. Specify only the selector name (for example, search or children) in the /selectors regex pattern.

  3. Use a filter rule like the following example:

    code language-none
    /006 {
      /type "deny"
      /path "/content/*"
      /selectors     '(feed|rss|pages|languages|blueprint|infinity|tidy|sysview|docview|query|jcr:content|_jcr_content|search|children|childrenlist|ext|assets|assetsearch|[ 0-9-] +)'
      /extension '(json|xml|html|feed)'
    }
    
  4. Verify that the filter rule matches requests as intended by testing URLs with the specified selectors.

recommendation-more-help
experience-cloud-kcs-help-kbarticles