Forum Discussion
nitass
Oct 18, 2011Employee
it seemed working fine in my lab. is there anything i missed?
[root@iris:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.17.33:http
ip protocol tcp
rules myrule
profiles {
http {}
tcp {}
}
}
[root@iris:Active] config b pool foo list
pool foo {
members 10.10.70.110:http {}
}
[root@iris:Active] config b rule myrule list
rule myrule {
when HTTP_RESPONSE {
if {[HTTP::header exists "status"]} {
switch [HTTP::header value "status"] {
"OK" {
HTTP::respond 302 Location "http://www.google.com" "Set-Cookie" "test"
}
default { do something }
}
}
}
}
[root@iris:Active] config curl -I http://10.10.70.110
HTTP/1.1 200 OK
Date: Tue, 18 Oct 2011 00:10:01 GMT
Server: Apache/2.0.59 (rPath)
Last-Modified: Sat, 11 Jun 2011 00:31:47 GMT
ETag: "667a-67-cfb682c0"
Accept-Ranges: bytes
Content-Length: 103
Vary: Accept-Encoding
status: OK
Content-Type: text/html; charset=UTF-8
[root@iris:Active] config curl -I http://172.28.17.33
HTTP/1.0 302 Found
Location: http://www.google.com
Set-Cookie: test
Server: BigIP
Connection: Keep-Alive
Content-Length: 0