Forum Discussion
nitass
Aug 07, 2011Employee
so if someone visit www.srwd18.com,client will go to www.google.com or where?
------it can't show the page,I don't know why
sorry i'm wrong. both events are triggered but user gets the first redirection since multiple redirections aren't supported.
[root@tulip:Active] config b virtual bar list
virtual bar {
pool foo
destination 172.28.17.66:http
ip protocol tcp
rules
rule1
rule2
profiles
http
tcp
}
[root@tulip:Active] config b rule rule1 list
rule rule1 {
when HTTP_REQUEST {
log local0.info "rule1"
if {[HTTP::host] equals "www.srwd18.com"} {
HTTP::redirect "http://www.baidu.com"
}
}
}
[root@tulip:Active] config b rule rule2 list
rule rule2 {
when HTTP_REQUEST {
log local0.info "rule2"
if {[HTTP::host] equals "www.srwd18.com"} {
HTTP::redirect "http://www.google.com"
}
}
}
[root@tulip:Active] config curl -i http://www.srwd18.com/
HTTP/1.0 302 Found
Location: http://www.baidu.com
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@tulip:Active] config tail -f /var/log/ltm
Aug 7 05:27:47 tmm tmm[1843]: Rule rule1 : rule1
Aug 7 05:27:47 tmm tmm[1843]: Rule rule2 : rule2
Aug 7 05:27:47 tmm tmm[1843]: 01220001:3: TCL error: rule2 - Operation not supported. Multiple redirect/respond invocations not allowed (line 3) invoked from within "HTTP::redirect "http://www.google.com" "