Expand my Community achievements bar.

Radome value in page mapping config

Avatar

Level 4

Hello,

 

A question. I'm creating a page mapping and I've run into a problem that I can't find a regular expression for the mapping.

Is there an expression that accepts any

 

.../{any value}/...

sling:internalRedirect     /content/sites/websites/$1/product/$2

sling:match.     mysite.com/(en_us|es_mx|de_de|ja_jp|fr_fr)/products/category/{any value}/(.*)


parameter and does not pass it into a property for the redirect?

I do not have a standard situation, but I don’t really want to create custom services for this case.

 

Thank you in advance.

5 Replies

Avatar

Level 6

Hi @aliaksandr_hvozdzeu 

This expression should work for any match: (.*?)

salamswapnil_1-1688382981289.png

 

Yes. RegEX working but didn't help me because I think (.*?) passed to $n variable and brock the path to the resource.

Avatar

Community Advisor

Hello @aliaksandr_hvozdzeu - 

 

sling:internalRedirect /content/sites/websites/$1/product/$2 sling:match mysite.com/(en_us|es_mx|de_de|ja_jp|fr_fr)/products/category/(?:.)/(.)

Avatar

Community Advisor

Why do it on Publisher, would it not be better to do it in Webserver layer?

 

Regards,

Peter 

Yes, it is better, but in our case, it is not possible to do this. There are many reasons.