Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

DAM asset got 302 redirection on Publisher

Inzali
Level 1
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
Ritesh_M
Correct answer by
Community Advisor
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
asutosh_jena
Community Advisor
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!

Inzali
Level 1
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! 

Ritesh_M
Correct answer by
Community Advisor
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