Forum Discussion
rprague_79440
Feb 11, 2012Nimbostratus
Redirecting https traffic to an https subdomain?
Quick disclaimer, while I know what iRules do, I haven't bothered implementing any, because we haven't really needed to, but laws make things complicated, so we're looking for a way to reroute traffic...
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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects