I need to replace url like this:
I’m doing it now with 2 separate rules:
- regexp replace “^/some/prefix” with “”
- append “/secret-suffix”
What I’d do if groups were supported is:
Is it possible?
I read vcl-regular-expression-cheat-sheet guide but it’s talking about pure VCL, not sure how to use it in UI based config.
Seems like I could use something like
if(req.url ~ "^/some/prefix(/.+)$", re.group.1 "some suffix", "") in UI as constant Set mode (instead of Regex), but it looks overcomplicated.
Please sign in to leave a comment.