I have a content path /content/my-project/gb/en/home/test.
Then I used request.getResourceResolver().map("/content/my-project/gb/en/home/test").
Now I want to reverse this process. I need the actual content path from the mapped path.
Ex: https://www.myproject.com/en/home/test.html to /content/my-project/gb/en/home/test
Any idea how I can achieve this? [I tried resourceResolver.resolve("https://www.myproject.com/en/home/test.html").getPath() but it's not working.]
Thanks in advance.
Solved! Go to Solution.
Hi @Sady_Rifat ,
Can you please try using etc/mapping and create new node in /etc/map with below value for reverse mapping.
sling:internalRedirect String /content/site/en/en/(.*).html sling:match String localhost.4502/en/$1
reverse mapping like above and to map short urls to actual content you can create mapping.