17-Aug-2020 23:38
we have configured Irule redirection
From https://f5.com/uri1/uri2/uri3 to f5.com/urixyz
but having issue with other url also .....redirection for other url also..
https://f5.com/uri5/uri4/uri1/uri2/uri3 redirect to f5.com/urixyz
........how do i specifically create for https://f5.com/uri1/uri2/uri3 this only ....so that it will not effect other
17-Aug-2020 23:59
Hello Gajji.
Try this.
if { [HTTP::uri] eq "https://f5.com/uri1/uri2/uri3" } {
HTTP::redirect "https://f5.com/urixyz"
}
Regards,
Dario.
18-Aug-2020 02:12
ok will try thanks
18-Aug-2020 02:15
You mean to configure this way????
when HTTP_REQUEST {
if { ([HTTP::host] equals "f5.com") and ([HTTP::uri] eq "/uri1/uri2/uri3") } {
HTTP::redirect https://f5.com/ruixyz
18-Aug-2020 02:24
Actually it depends how your queries are conformed.
Let me explain it better.
[HTTP::uri] is equivalent to the second field in query method.
These are two examples of valid queries.
So, to match both cases, you could consider using this iRule:
if { [HTTP::path] starts_with "/uri1/uri2/uri3" } {
HTTP::redirect "https://f5.com/urixyz"
}
Regards,
Dario.