Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

DAM asset got 302 redirection on Publisher

Avatar

Level 1

Recently we have installed AEM 6.5 SP8 for 2 authors and 3 publishers.
All the other aem instances are going well so far apart from one publisher instance.

The publisher redirects whenever we access the assets under /content/dam/. In this case, I tested on publisher itself via ip so no dispatcher gets involved. I check whether any /etc/map gets set up with any redirection rule but nothing apart from page redirection(I tried removing this mappings also but no luck). I even restarted the publisher instance. But I couldn't see any change. Can anyone advise me on anything else I should check? Or may I know if there is anyone encountering the similar issue with me?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Inzali ,

 

Since 302 is temporary redirect, have you written any custom rewriter (you must find a configuration under your project something like /apps/myproject/config/rewriter) and transformer and may be have enabled it for specific run-modes. Because this can be another way to have redirects other than etc/map and 'Apache Sling Resource Resolver Factory'.

 

Please check the video for the above explanation

https://www.youtube.com/watch?v=0fM2vUEj2bA

https://www.youtube.com/watch?v=0fM2vUEj2bA

 

https://github.com/riteshmittal/link-transformer/blob/main/TransformerDemo.java

 

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @Inzali 

 

Below are the steps I will follow to debug the issue.

  1. Check the run mode with which the instance in running. Make sure all the publish instance are running on same run mode. If the affected instance is running on a separate runmode than the working publish instance then check if there are any specific OSGi configuration added under run modes.
  2. Check the Resource Resolver Factory config and see if there are any mapping defined. Check for the etc/maps location in this configuration as well.
  3. Check the etc/maps mapping defined for this specific instance. When you say you are getting 302 redirect it's something done with etc/maps mostly. Any mapping defined with sling:redirect will return 302 response status until unless specified with any other response status.
  4. As you mentioned this issue is reproducible using IP so it's clearly an issue with publish instance and not an issue at the dispatcher end, so we can limit the debugging within the publish instance.

Thanks!

Avatar

Level 1

Thanks much for your comment! I have checked the etc/maps. Since we are using the same map setting across all the publisher instances, I don't think it might be the cause. But I still have to check the runmode and osgi resolver config thoroughly where the cause might exist. Much appreciated! 

Avatar

Correct answer by
Community Advisor

Hi @Inzali ,

 

Since 302 is temporary redirect, have you written any custom rewriter (you must find a configuration under your project something like /apps/myproject/config/rewriter) and transformer and may be have enabled it for specific run-modes. Because this can be another way to have redirects other than etc/map and 'Apache Sling Resource Resolver Factory'.

 

Please check the video for the above explanation

https://www.youtube.com/watch?v=0fM2vUEj2bA

https://www.youtube.com/watch?v=0fM2vUEj2bA

 

https://github.com/riteshmittal/link-transformer/blob/main/TransformerDemo.java