Hi All, I am trying to implement the Redirect Map Manager in AEM Cloud as per the below documentation
https://adobe-consulting-services.github.io/acs-aem-commons/features/redirect-map-manager/index.html
Redirect map manager is working in AEM Cloud latest i created the entries then i followed the below documentation for configuring the dispatcher for rewrites
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/con...
I have created the managed-rewrite-maps.yaml file and added the below code
maps:
- name: my.map
path: /content/dam/redirectmaps/mysite-redirectmap.txt
i have the redirectmap file in the mentioned location and added this in rewrite.rules
# RewriteMap from managed rewrite maps
RewriteMap map.foo dbm=sdbm:/tmp/rewrites/my.map
RewriteCond ${map.foo:$1} !=""
RewriteRule ^(.*)$ ${map.foo:$1|/} [L,R=301]
I am getting the error as below
AH00526: Syntax error on line 11 of /etc/httpd/conf.d/rewrites/rewrite.rules:
RewriteMap: file for map map.foo not found:/tmp/rewrites/my.map.dir
tried to use different paths in rewrite.rules
RewriteMap map.foo txt:/content/dam/redirectmaps/mysite-redirectmap.txt
but it dint worked any help on how to get or reference the redirectmap file in aem cloud dispatcher.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @SaujanyaGu,
your Dispatcher config looks ok, I suggest you check the following things:
[Mon Sep 23 11:01:23.374668 2024] [managed_rewrite_maps:debug] [pid 303] Starting monitoring of managed rewrite maps changes
[Mon Sep 23 11:01:23.381890 2024] [managed_rewrite_maps:debug] [pid 303] Waiting for 300 seconds for next managed rewrite maps check
[Mon Sep 23 11:01:54.604026 2024] [managed_rewrite_maps:debug] [pid 513] Managed rewrite maps configured in '/etc/httpd/opt-in/managed-rewrite-maps.yaml'
[Mon Sep 23 11:01:54.629172 2024] [managed_rewrite_maps:debug] [pid 513] mapping 'pilot.map' from path '/content/historical-locks/com-pilot.pilot-map.txt' with params wait = 'false' and ttl = '3600'
[Mon Sep 23 11:01:54.639099 2024] [managed_rewrite_maps:debug] [pid 513] checking time since last modification of '/tmp/rewrites/pilot.map.pag' > ttl '3600' seconds
Good luck,
Daniel
Hi @SaujanyaGu,
your Dispatcher config looks ok, I suggest you check the following things:
[Mon Sep 23 11:01:23.374668 2024] [managed_rewrite_maps:debug] [pid 303] Starting monitoring of managed rewrite maps changes
[Mon Sep 23 11:01:23.381890 2024] [managed_rewrite_maps:debug] [pid 303] Waiting for 300 seconds for next managed rewrite maps check
[Mon Sep 23 11:01:54.604026 2024] [managed_rewrite_maps:debug] [pid 513] Managed rewrite maps configured in '/etc/httpd/opt-in/managed-rewrite-maps.yaml'
[Mon Sep 23 11:01:54.629172 2024] [managed_rewrite_maps:debug] [pid 513] mapping 'pilot.map' from path '/content/historical-locks/com-pilot.pilot-map.txt' with params wait = 'false' and ttl = '3600'
[Mon Sep 23 11:01:54.639099 2024] [managed_rewrite_maps:debug] [pid 513] checking time since last modification of '/tmp/rewrites/pilot.map.pag' > ttl '3600' seconds
Good luck,
Daniel
Hi @daniel-strmecki ,
Thanks for the response.
I'm using the latest AEMaaCS version (Adobe Experience Manager 2024.10.18311.20241017T104455Z-241000).
The redirect map file only contains the following:
/test /content/test-project/us/en/qa/test.html
However, I’m unable to locate the logs you mentioned. Could you please guide me on how to access them?
Also, I created the managed-rewrite-maps.yaml file at this path:
C:\AEM\test-project\dispatcher\src\opt-in\managed-rewrite-maps.yaml
Is this the correct location?
Thanks for your help!
Views
Replies
Total Likes
Hi @SaujanyaGu,
yes, that is the correct location. Make sure you have Dispatcher flexible mode enabled - USE_SOURCES_DIRECTLY, as this is a prerequisite.
The log entries I shared should be in the aemdispatcher log file. In case you don't see Dispatcher pulling the redirect maps successfully on regular internals it will not work. I suggest that you first test on the local SDK with a local Dispatcher so you can set the DEBUG log level.
Here is my example that is working fine:
Good luck,
Daniel
Views
Replies
Total Likes
@SaujanyaGuIn order to locate the logs ...
I assume you already have Dispatcher started in local. If not, this is a nice guide that can help you do that: https://medium.com/@mayursatav/how-to-set-up-aem-dispatcher-on-local-6ed26ffd2579
Once you have it running in local, it means you have a docker container running. You can install Docker Desktop app, and there you can easily enter the container filesystem using the Open in terminal action option (https://www.docker.com/blog/integrated-terminal-for-running-containers-extended-integration-with-con...), and then lookup for /var/log/apache2
More details about setting up Dispatcher Tools in local: https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/local-development-.... This includes also info on how to set debug level for dispatcher and apache (search for DISP_LOG_LEVEL=Debug and REWRITE_LOG_LEVEL=Debug )
Views
Replies
Total Likes
Hi @SaujanyaGu
Requires AEM CS release version 18311 or higher
Please check
Past Cloud Service Releases
Views
Likes
Replies
Views
Likes
Replies