Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Reverse Resource resolver Mapping not working

karansheel
Level 3
Level 3

Hi,

As per our requirement we have to do shortening of some url's.  Below is URL and there shortn path

/content/gemini/us/en/types/collection/watch/a/a1234.html  ---->   /us/en/types/watch/a1234.html  

/content/gemini/us/en/types/collection/jewelery/c/c7934.html  ------> /us/en/types/jewelery/c7934.html

/content/gemini/us/en/types/collection/gifts/r/r123.html    ------>    /us/en/types/gifts/r123.html

To acheive this  we have written a regex pattern in reeource resolver factory mapping.   here is rule

(/content/gemini)(/[^/]+/[^/]+/types)(/collection)(/[^/]+/)[a-z]/(.*):$2$4$5

It's working fine and making a shortern URL. But problem is reverse mapping is not working . Is it possible to achieve reverse mapping using regex pattern ? or any issue in my rule

1 Reply