ÃÛ¶¹ÊÓÆµ

Enabling Request Transformation for Shortened URLs on AEM as a Cloud Service Author Instance

In ÃÛ¶¹ÊÓÆµ Experience Manager (AEM) as a Cloud Service, shortened URLs on the author instance redirect to the default start page (/aem/start.html) instead of the intended content. This issue affects teams validating profile pages using URLs that omit the /content/websites prefix. The problem occurs because the author instance doesn’t apply request transformations by default. You can resolve this by deploying a custom CDN configuration using the AEM Config Pipeline.

Description description

Environment

Product: ÃÛ¶¹ÊÓÆµ Experience Manager as a Cloud Service (AEMaaCS) – Sites
Instance: AEMaaCS Author instance with CDN configuration deployed via the Config Pipeline

Issue/Symptoms

  • Accessing a shortened URL such as /ui/en/about/people/profiles.user-name+8b1126ad.html redirects to the AEM start page.
  • Using the full path /content/websites/ui/en/about/people/profiles.user-name+8b1126ad.html correctly displays the profile page.
  • On AEM as a Cloud Service, the author instance resolves URLs directly from the JCR and does not use a traditional dispatcher.

Cause

By design, AEMaaCS applies request transformation rules only on the publish tier using dispatcher rewrite rules. The author instance doesn’t use a dispatcher, so it doesn’t transform shortened URLs automatically. To enable this on the author tier, a CDN configuration must be deployed via the Config Pipeline. The transformation rule must also use the correct syntax, including proper escaping (for example, \"/content/websites\\\\1\").

Resolution resolution

To fix the issue,

  1. Deploy a CDN configuration using the AEM Config Pipeline. This configuration should include a custom rule named add-content-websites-prefix. The rule checks if the request is on the author tier and if the path starts with /ui/. If both conditions are met, it rewrites the path by prepending /content/websites.

    code language-none
    kind: "CDN"
    version: "1"
    metadata: { envTypes: [ "dev", "stage", "prod"]  }
    data:
      requestTransformations:
        rules:
          - name: add-content-websites-prefix
            when:
              allOf:
                - { reqProperty: tier, equals: author }
                - { reqProperty: path, matches: "/ui/" }
            actions:
              - type: transform
                reqProperty: path
                op: replace
                match: (.*)$
                replacement: "/content/websites\\1"
    
  2. After deploying the configuration, test shortened URLs on the author instance. They should now correctly resolve to the intended content.

Additional considerations

  • While Out-of-the-box (OOTB) CDN-based request transformation mechanism originally targets publish environments, you can extend it to author environments by deploying a proper configuration via the Config Pipeline.
  • ÃÛ¶¹ÊÓÆµ recommends using full paths for routine content validation on the author instance. Always test custom transformation rules to avoid disrupting authoring workflows.
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f