Regarding etc/map with sub folder which need internalredirect towards /content/dam/wwe/ | Community
Skip to main content
Level 2
January 12, 2022
Solved

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

  • January 12, 2022
  • 1 reply
  • 1752 views

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.

but for below mapping it giving 404 error,

jcrresolver is showing below mappings,

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

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by sspencer123

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 

1 reply

Adobe Employee
January 13, 2022

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

phampiAuthor
Level 2
January 14, 2022

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

sspencer123Adobe EmployeeAccepted solution
Adobe Employee
January 14, 2022

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