Creating Mapping Definitions in AEM

In a standard installation of AEM you can find the folder:

/etc/map/http

This is the structure used when defining mappings for the HTTP protocol. Other folders ( sling:Folder) can be created under /etc/map for any other protocols that you want to map.

Configuring an Internal Redirect to /content

To create the mapping that prefixes any request to https://localhost:4503/ with /content:

  1. Using CRXDE navigate to /etc/map/http.

  2. Create a node:

    • Type sling:Mapping
      This node type is intended for such mappings, though its use is not mandatory.

    • Name localhost_any

  3. Click Save All.

  4. Add the following properties to this node:

    • Name sling:match

      • Type String

      • Value localhost.4503/

    • Name sling:internalRedirect

      • Type String[]

      • Value /content/

  5. Click Save All.

This handles a request such as:
localhost:4503/geometrixx/en/products.html
as if:
localhost:4503/content/geometrixx/en/products.html
had been requested.

NOTE
See Resources in the Sling Documentation for further information about the sling properties available and how they can be configured.
NOTE
You can use /etc/map.publish to hold the configurations for the publish environment. These must be replicated, and the new location ( /etc/map.publish) configured for the Mapping Location of the Apache Sling Resource Resolver of the publish environment.

Experience Manager


Elevate and Empower Teams with Agentic AI for Exceptional Experiences

Online | Strategy Keynote | General Audience

Elevate and empower your CX teams with AI that transforms creativity, personalization, and productivity. Discover how Adobe is...

Tue, Mar 18, 1:00 PM PDT (8:00 PM UTC)

Register

3 Pillars of Purpose-driven Experiences: Trust, Data, and GenAI

In-person | Session | General Audience

Learn how leading B2B and B2C brands like AT&T and IBM are intersecting data, GenAI and trust to build “purpose-driven” experiences that...

Wed, Mar 19, 1:00 PM PDT (8:00 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more