Forum Discussion
nitass
Feb 11, 2012Employee
Are there problems doing this because of the nature of https sessions? Is something like this possible at all?yes, it is possible.
e.g.
[root@ve1023:Active] config b virtual bar list
virtual bar {
destination 172.28.19.79:443
ip protocol 6
rules myrule
profiles {
clientssl {
clientside
}
http {}
tcp {}
}
}
[root@ve1023:Active] config b class name_dg list
class name_dg {
"coffeebean" { "sg" }
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
if {$host starts_with "www."} {
set cust [getfield [HTTP::uri] "/" 2]
if {[class match -- $cust equals name_dg]} {
HTTP::redirect " map "www [class match -value $cust equals name_dg]" $host][HTTP::uri]"
}
}
}
}
[root@ve1023:Active] config curl -Ik https://www.domain.com/coffeebean/portal
HTTP/1.0 302 Found
Location: https://sg.domain.com/coffeebean/portal
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -Ik https://www.domain.com/coffeebean/admin
HTTP/1.0 302 Found
Location: https://sg.domain.com/coffeebean/admin
Server: BigIP
Connection: Keep-Alive
Content-Length: 0