this value is dynamically changed (like Apple = vendor1;Lemon = vendor2)
Hello guys, I have one problem for which I don't have enough irule's experiences, maybe someone will know...
I need to write irule which takes a value from one url and paste it to another, this value is dynamically changed (like Apple = vendor1;Lemon = vendor2), for example:
https://Hello.world.com/test/sun/A/Apple to redirect to
https://Hello.world.com/test/sun/B/Apple to redirect to
https://Hello.world.com/test/sun/A/Lemon to redirect to
https://Hello.world.com/test/sun/B/Lemon to redirect to
I have been thinking about something like this (just idea):
- when HTTP_REQUEST {
- if { [HTTP::uri] starts_with "/A/*" } {
- set VALUE [substr [HTTP::uri] "$*" ""]
- HTTP::redirect "$*:Olala/blabla"
} }
But I have no idea, how to take * (Apple, Lemon, ... basically whatever is hidden behind *) and insert it into new url, because * will be working like identifier of a particular vendor.
Or is possible to solve this problem via Policy?
Thank you for your hints AK