Sunder
Aug 25, 2020Nimbostratus
How to remove from path first segment on F5
Hello I have problem to implement solution as above in topic.
I have URL: https://1234.com/en-gb/cat/dog and I want from path remove first segment "en-gb" and put rest of the path to redirect
when HTTP_REQUEST {
if { ([string tolower [HTTP::path]] starts_with "/en-gb")
HTTP::redirect "https://zoo.com/london/en-gb/apps/tickets [string tolower [URI::path [HTTP::uri] 2]]"
}
}
Problem is that URI::path is not working and F5 probably is not reading it as function (HTTP has purple color, so it is correct).
Is it possible to do it in different way to manipule segments belong to path variable?