Expand my Community achievements bar.

Reverse Resource resolver Mapping not working

Avatar

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