Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Regarding etc/map with sub folder which need internalredirect towards /content/dam/wwe/

Avatar

Level 3

Hi Community members, 

Refering :http://blog.magmalabs.io/2016/07/26/how-to-use-internal-redirects-in-aem.html

We need etc mapping for subfolder.

etc/map is already exists on production and routing pages properly. We have added few images in dam with path "/content/dam/wwe" ,

Below mapping working fine.

phampi_0-1642014353093.png

but for below mapping it giving 404 error,

phampi_1-1642014473362.png

jcrresolver is showing below mappings,

phampi_2-1642014602917.png

Please help me to resolve this, thanks in advance. Please let me know if need more details.

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

sling mappings are always tricky to diagnose without being on the system but your maps do not look correct.

Can you try just putting in wwe and not /wwe/ and see if the redirect goes as intended. also, if you go to news///wwe  what happens?

 

I would also try and change the first entry to the /news/wwe just to verify that redirect works then you may want to have a generic localhost entry and subentries for both news and news/wwe with that one first 

View solution in original post

5 Replies

Avatar

Level 2

2 things I see that may be as issue; 

1) your redirect for wwe has 3 /// in it which may cause an issue and also I think the rules would be evaluated from top down so /news will always evaluate first so it may never get to the second rule.

 

I almost always use mod rewrite and mod substitute for this kind of thing as it is so much easier to evaluate than sling mappings IMO

Avatar

Level 3

Hi @stephens7886327, Thanks for the reply. We don't have dispatcher access to make changes.Is there any alternative possible, please let me know. Thanks.

Avatar

Correct answer by
Level 2

sling mappings are always tricky to diagnose without being on the system but your maps do not look correct.

Can you try just putting in wwe and not /wwe/ and see if the redirect goes as intended. also, if you go to news///wwe  what happens?

 

I would also try and change the first entry to the /news/wwe just to verify that redirect works then you may want to have a generic localhost entry and subentries for both news and news/wwe with that one first 

Avatar

Level 3

Hi @stephens7886327

Respective images are getting downloaded instead of visible in browser. I also tried to play around Apache Sling Content Disposition Filter. but no luck. Could you please guide. 

Thanks and regards,

Pavan

Avatar

Level 2

Can you show an image of the filter?  You need to probable have the /wwe path in there and not the /content path.

this would be easy to solve with apache but you have no access.

also try using curl -I to see if the file has the header attachment