09-Dec-2020 09:00
i need to redirect the following:
https://abc.org/prod/items/ebb81b9e-0e6f-4bd8-af22-bf865212e2cd/1/
to
https://cde.edu/ware/lesson/ebb81b9e-0e6f-4bd8-af22-bf865212e2cd/1/
there will be many requests containing different content after "/items/" that will need to be redirected to the new site and i am hoping to do this with one iRule.
is there a way to strip out the "ebb81b9e-0e6f-4bd8-af22-bf865212e2cd/1/" and add it to the new URL?
09-Dec-2020 12:59
Hi Ts67p18,
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/prod/items/" } {
HTTP::redirect "https://cde.edu/ware/lesson[string map -nocase {/prod/items/ /} [HTTP::uri]]"
return
}
}