ACS Common Redirect Manager | Community
Skip to main content
Level 2
June 13, 2025
Solved

ACS Common Redirect Manager

  • June 13, 2025
  • 2 replies
  • 1059 views

Hi Team,

We are trying to implement ACS Common's Redirect Manager in our project as per: https://adobe-consulting-services.github.io/acs-aem-commons/features/redirect-manager/index.html

Followed the steps mentioned in that article but at the end redirect is not happening. Wondering what is missing.

Not: Enabled Redirect Manager through the web console for not to test.

AEM Version 6.5.21.0

Best answer by SantoshSai

Hi @navyavo,

A few things to check that are commonly overlooked:

  1. Was the Redirect Map Manager also enabled on the publish instance?
    Redirects are typically evaluated on the publisher (especially when sitting behind a Dispatcher or CDN). If it’s only enabled on author, the redirects won’t fire in real-world usage.

  2. It’s recommended not to manually enable the configuration via the Web Console.
    Instead, follow best practices and deploy the OSGi configuration via code - that way it’s version-controlled and consistent across environments.

Add the configuration in your project codebase under:

ui.config/src/main/content/jcr_root/apps/your-project/config/...

Example config file for enabling Redirect Manager:

/apps/my-app/config.publish/com.adobe.acs.commons.redirects.filter.RedirectFilter.config

Sample configuration like:

enabled=true
mapUrls=true
extensions=["html"]
paths=["/content"]
preserveQueryString=true

Adjust the paths and extensions as per your requirement.

2 replies

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
June 13, 2025

Hi @navyavo,

A few things to check that are commonly overlooked:

  1. Was the Redirect Map Manager also enabled on the publish instance?
    Redirects are typically evaluated on the publisher (especially when sitting behind a Dispatcher or CDN). If it’s only enabled on author, the redirects won’t fire in real-world usage.

  2. It’s recommended not to manually enable the configuration via the Web Console.
    Instead, follow best practices and deploy the OSGi configuration via code - that way it’s version-controlled and consistent across environments.

Add the configuration in your project codebase under:

ui.config/src/main/content/jcr_root/apps/your-project/config/...

Example config file for enabling Redirect Manager:

/apps/my-app/config.publish/com.adobe.acs.commons.redirects.filter.RedirectFilter.config

Sample configuration like:

enabled=true
mapUrls=true
extensions=["html"]
paths=["/content"]
preserveQueryString=true

Adjust the paths and extensions as per your requirement.

Santosh Sai
NavyaVoAuthor
Level 2
June 13, 2025

Thanks @santoshsai - Enabling it on publish instance via /system/console worked - but strange it's nowhere mentioned in the article. But yes, We will deploy the configuration via code.

Jagadeesh_Prakash
Community Advisor
Community Advisor
June 14, 2025

Hi @navyavo  I tried on WKND project with AEM6.5.21 version and latest ACS commons 6.12 versions and it worked absolutly fine. I did not even push any thing via code. Once cross check your configuration? or any custom code that is impacting the flow

 

 

 

 

 

AmitVishwakarma
Community Advisor
Community Advisor
June 16, 2025

Hi @navyavo ,

Pre-Requisites:

1. ACS Commons installed (preferably latest 6.x for 6.5.21)

  - Check via: http://localhost:4502/system/console/bundles

  - Must see:

com.adobe.acs.acs-aem-commons-bundle ACTIVE

 2. Confirm Redirect Manager is enabled:

  - On both Author and Publish.

  - Especially Publish if you're testing on Dispatcher.

Try below steps:

 

1. Create OSGi Config for Redirect Filter

Deploy via code under:

/apps/your-project/config.publish/com.adobe.acs.commons.redirects.filter.RedirectFilter.config

Working Configuration:

enabled=true mapUrls=true extensions=["html"] paths=["/content"] preserveQueryString=true

If redirects should apply to JSON or no extension paths:

extensions=["html","json",""]

DO NOT enable only via /system/console/configMgr manually in production. Always deploy via code.

 

2. Create Redirect Entries via UI

Navigate to:

http://localhost:4502/etc/acs-commons/redirects.html

Create a Redirect Map Page:

  - Example: /etc/acs-commons/redirects/global

Create a Redirect Entry:

  - Source: /content/mysite/en/old-url

  - Target: /content/mysite/en/new-url

  - Status: 301

  - Context Root Redirect: false (unless redirecting from / root)

  - Note: Doesn’t require .html in source, handles it via config

After saving, a redirect-map.txt node is generated under the redirect page.


3. Publish All Relevant Content

Make sure the following are activated to publish:

  - /etc/acs-commons/redirects/global

  - redirect-map.txt node

  - Any dependent content or redirect targets

 

4. Check Dispatcher Caching Behavior

For dispatcher, make sure:

  - Dispatcher is not caching redirect-map.txt response

  - HEAD request works correctly for /etc/acs-commons/... path

Apache config example:

<LocationMatch "/etc/acs-commons/redirects/.*"> Header set Cache-Control "no-cache, no-store, must-revalidate" </LocationMatch>

5. Test Redirect Behavior

Use browser or curl:

curl -I http://localhost:4503/content/mysite/en/old-url.html

Expected response:

HTTP/1.1 301 Moved Permanently Location: /content/mysite/en/new-url.html

 

Regards,
Amit