Forum Discussion
nitass
Oct 10, 2012Employee
what about this one?
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:443
ip protocol 6
rules myrule
profiles {
clientssl {
clientside
}
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
set my_uri [string tolower [HTTP::uri]]
if {[class match -- $my_uri contains www_vanity_url_redirection]} {
set vanity_path [class match -value $my_uri contains www_vanity_url_redirection]
HTTP::redirect $vanity_path
}
}
}
[root@ve10:Active] config b class www_vanity_url_redirection list
class www_vanity_url_redirection {
"/test" { "https://www.someotherplace.com" }
}
[root@ve10:Active] config curl -Ik https://172.28.19.79/test
HTTP/1.0 302 Found
Location: https://www.someotherplace.com
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve10:Active] config curl -Ik https://172.28.19.79/testy
HTTP/1.0 302 Found
Location: https://www.someotherplace.com
Server: BigIP
Connection: Keep-Alive
Content-Length: 0