I think …url.path.get(1) returns part of the path without the forward slashes.
And then http.req.url.path.strip_start_chars starts from the first forward slash, so it will never match the beginning.
This should do it :
thx but I also tried HTTP.REQ.URL.PATH_AND_QUERY.STRIP_START_CHARS("/").STRIP_START_CHARS("myapp1") which works perfectly when the text is fixed. the problem is to use a pattern set or string map or anything dynamic like HTTP.REQ.URL.PATH.GET(1) which seems to be ignored inside of the strip function
f
Frank Vandebergh
02/01/2021, 6:04 PM
Indeed it seems to accept only constants.
Another way is using URL transformation or by using SUBSTR function based on length of first url path:
m
Martin Meier
02/02/2021, 7:04 AM
Thanks @Frank Vandebergh for the SUBSTR tip, that works perfect!