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
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @NavyaVo,
A few things to check that are commonly overlooked:
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.
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.
Hi @NavyaVo,
A few things to check that are commonly overlooked:
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.
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.
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.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
@Jagadeesh_Prakash You must enabled com.adobe.acs.commons.redirects.filter.RedirectFilter through system console? By default for us it's disabled on both author and publisher hence @SantoshSai mentioned to deploy via code so that we don't need to do it manually.
Views
Replies
Total Likes
@NavyaVo Seems i did not understand your query properly. What difference it will make pushing configuration via code and doing it manually in both the ways, it will work right ? or may be am i missing any thing here?
Best practise is to push via code i agree. But as per your query i think even after following the articial you were not able to get it worked right ? Is that the question ?
Views
Replies
Total Likes
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
Views
Replies
Total Likes