HAProxy Redirect URL with subdomain

I have a domain name which

https://abc.stg-repo.example.com/v1.
( The subdomain abc is the repository name and it is dynamic). I want to redirect to below URL using HAProxy

https://stg-repo.example.com/artifactory/api/docker/abc/v1

Hi Prash,

Your request is not clear enough.
Do you want a redirect as a 301 or do you want to rewrite the URL being passed to the application server?

Baptiste