eran
Jan 03, 2023Altostratus
irule redirect with partial URI
hi i need some assitance to my current irule that i created to catch a uri and then delete the the folder path and resend the request to another virtual server i have. i have tried to redirect to the new virtual server pool also.
and im haveing abit of issues to catch upper and also lower case letters, meaing i want to catch the word abc and also Abc witch ever the word the user type. and then redirect the same host and the parameter of the uri to the new pool.
heres an example
original request ====> https://hostname.com/Abc/?doc=9999&cont=1000
needed request ====> https://hostname.com/?doc=9999&cont=1000
my irule
when HTTP_REQUEST {
if {string tolower [HTTP::uri] starts_with "/Abc" } {
HTTP::uri [string map {"/abc" ""}[HTTP::uri]]
pool <new pool>
}
}