Forum Discussion
nitass
Dec 12, 2011Employee
e.g.
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/1" -
"/2" { HTTP::redirect "http://[HTTP::host]/3" }
"/4" -
"/5" { HTTP::redirect "http://[HTTP::host]/6" }
"/7" -
"/8" { HTTP::redirect "http://[HTTP::host]/9" }
default { do something }
}
}
}
[root@ve1023:Active] config curl -I http://172.28.19.79/1
HTTP/1.0 302 Found
Location: http://172.28.19.79/3
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://172.28.19.79/2
HTTP/1.0 302 Found
Location: http://172.28.19.79/3
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://172.28.19.79/4
HTTP/1.0 302 Found
Location: http://172.28.19.79/6
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://172.28.19.79/5
HTTP/1.0 302 Found
Location: http://172.28.19.79/6
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://172.28.19.79/7
HTTP/1.0 302 Found
Location: http://172.28.19.79/9
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://172.28.19.79/8
HTTP/1.0 302 Found
Location: http://172.28.19.79/9
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://172.28.19.79/other
HTTP/1.1 404 Not Found
Date: Mon, 12 Dec 2011 14:17:53 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=iso-8859-1