HAproxy custom stick

Dear Friends, i have web application crm, please help to find any ideas for release stick session algoritm
User access application via url:
https://web.somesite.com/48c8155f1470878045eaa01f/1c_my_9469_1/*
https://web.somesite.com/account hash/database name/*
then enter db login and password
if authentication success application set cookie vrs_session with value 9c18917b-3706-44e0-967d-36e933fcbf94
sess2

I need stick client by /48c8155f1470878045eaa01f/1c_my_9469_1/ + vrs_session or custom cookie this need for calculate unique user sessions per account/database or if possible restrict connection if limit reached. it is possible via HAproxy?