Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Passing parameter in Internal Sling Redirection

Avatar

Level 4

Hi,

can we configure internal sling redirection with URL parameter?

When I configured like this :-

sling:internalRedirect = /content/action-url?action=user

it does not work.

But After removing the parameter from URL, it works.

Any Suggestion?

Thanks

Umesh

1 Accepted Solution

Avatar

Correct answer by
Administrator

Sling's mapping just cares for the mapping the request path to a resource. It does not care at all for request queries and query parameters. So it neither takes parameters into account for mapping nor is it able to magically add request parameters to requests.

More details:- https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html

More Reference:- We.Retail Sling Mappings (/etc/map/http) · GitHub



Kautuk Sahni

View solution in original post

2 Replies

Avatar

Correct answer by
Administrator

Sling's mapping just cares for the mapping the request path to a resource. It does not care at all for request queries and query parameters. So it neither takes parameters into account for mapping nor is it able to magically add request parameters to requests.

More details:- https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html

More Reference:- We.Retail Sling Mappings (/etc/map/http) · GitHub



Kautuk Sahni

Avatar

Level 1

By any chance did you get an answer for this??