what about httpclass?
[root@ve1023:Active] config b virtual bar list
virtual bar {
destination 172.28.19.79:80
ip protocol 6
httpclass myhttpclass
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b profile myhttpclass list
profile httpclass myhttpclass {
defaults from httpclass
pool none
redirect "http://newdomain.com[HTTP::uri]"
hosts {
"olddomain.com"
"www.olddomain.com"
}
}
[root@ve1023:Active] config curl -I http://olddomain.com/something
HTTP/1.0 302 Found
Location: http://newdomain.com/something
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -I http://www.olddomain.com/something
HTTP/1.0 302 Found
Location: http://newdomain.com/something
Connection: Keep-Alive
Content-Length: 0