Expand my Community achievements bar.

How can I add domain agnostic mapping in /etc/map/http/

Avatar

Level 2

I want to redirect request coming to http:localhot:4502/assets/api/v1/info?keyword=abc to 

http:localhot:4502/content/servlets/assets/api/v1/info?keyword=abc

I have added following mapping to /etc/map/http/

sling:match = localhost.4502/(assets)

sling:internalRedirect = /content/servlets/assets

 

and it is working as exptected but we have three environments dev, stage and prod and I want to create this mapping agnostic to domain how can I do that?

suppose dev domain is = mydev-domain.com

stage domain = mystage-domain.com

prod domain -= myprod-domain.com

 

how can I add mapping in /etc/map/http/ so that it will be domain agnostic. I tried following but it didn't work (got 404 in response)

 

sling:match = ^[^/]+/[^/]+/assets$

0 Replies