Forum Discussion
nitass
Nov 07, 2011Employee
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
destination 172.28.65.152:http
ip protocol tcp
rules myrule
persist cookie
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"xptoa.com" {
persist cookie insert "XPTO_A" "0d 00:04:00"
pool poolA
}
"xptob.com" {
persist none
pool poolB
}
}
}
}
[root@ve1023:Active] config b pool poolA list
pool poolA {
members 200.200.200.101:http {}
}
[root@ve1023:Active] config b pool poolB list
pool poolB {
members 74.125.235.48:http {}
}
[root@ve1023:Active] config curl -I http://xptoA.com/
HTTP/1.1 200 OK
Date: Mon, 07 Nov 2011 18:44:10 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Mon, 07 Nov 2011 11:52:31 GMT
ETag: "4183e3-2a-b08f5dc0"
Accept-Ranges: bytes
Content-Length: 42
Connection: close
Content-Type: text/html; charset=UTF-8
Set-Cookie: XPTO_A=1707657416.20480.0000; expires=Mon, 07-Nov-2011 18:43:27 GMT; path=/
[root@ve1023:Active] config curl -I http://xptoB.com/
HTTP/1.1 302 Found
Location: http://www.google.com/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
X-Content-Type-Options: nosniff
Date: Mon, 07 Nov 2011 18:44:15 GMT
Server: sffe
Content-Length: 219
X-XSS-Protection: 1; mode=block