09-Dec-2020 11:12
Hello Everyone,
I would like to do the following, Any help would be appreciated.
I have 3 URLs abc.org, def.org and ghi.org they all point to the same vip, i would like, when user go to these URLs, URL should change to xyz.com(new vip with the same ip).
Please let me who i can achieve this. thanks in advance.
09-Dec-2020
12:50
- last edited on
04-Jun-2023
21:09
by
JimmyPackets
Hi Adnankhan,
when HTTP_REQUEST {
switch [HTTP::host] {
"abc.org" -
"def.org" -
"ghi.org" {
HTTP::respond 301 Location "http://xyz.com[HTTP::uri]"
return
}
}
}
09-Dec-2020 13:20
Hi eaa,
i have tried this
when HTTP_REQUEST {
switch [HTTP::host] {
"abc.org" {
HTTP::respond 301 Location "http://xyz.com[HTTP::uri]"
return
}
}
}
but it doesn't change the URL.
09-Dec-2020
13:44
- last edited on
04-Jun-2023
21:09
by
JimmyPackets
Hi Adnankhan,
I guess your test client's traffic isn't pass over F5.
Can you review the logs and tcpdump?
when HTTP_REQUEST {
log local0. "vslog1 | CIP: [IP::client_addr] | Host: [HTTP::host]"
switch [HTTP::host] {
"abc.org" {
log local0. "vslog2 | CIP: [IP::client_addr] | Host: [HTTP::host]"
HTTP::respond 301 Location "http://xyz.com[HTTP::uri]"
return
}
}
}
logs:
tail -f /var/log/ltm | grep vslog
tcpdump:
tcpdump -ni 0.0 host <virtualserverIP> and host <clientIP>