I have a use case to redirect /content/project/en/test/events to /content/project/en/test page as internal redirection of page properties is not working .
I used following values under /etc/map/http folder :
sling:match as (.+)/en/test/(.+)$
sling:internalRedirect as (.+)/en/test.html
Still my required redirection is not working .
Please let me know correct configuration for the same .
Thanks&Regards.
The sling:internalRedirect
is the target to which user is taken so you should use in it the match from the sling:match
use: sling:internalRedirect
as $1/en/test.html
btw. there's a useful article about mappings here: https://www.cognifide.com/our-blogs/cq/multidomain-cq-mappings-and-apache-configuration/
EDIT: a simple config like this will work (redirect from home.html to page1.html):