Regarding etc/map with sub folder which need internalredirect towards /content/dam/wwe/ | Community
Skip to main content
Level 2
Jan 12, 2022 7:14 PM UTC
Solved

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

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.
sspencer123Accepted solution
Employee
Jan 14, 2022 1:55 PM UTC

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 

5 replies

Employee
Jan 13, 2022 6:25 PM UTC

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

Translate
phampiAuthor
Level 2
Jan 14, 2022 12:35 PM UTC

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.

Translate
sspencer123Accepted solution
Employee
Jan 14, 2022 1:55 PM UTC

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 

Translate