Forum Discussion
adiezma_1656
Jun 15, 2012Nimbostratus
Hash CARP: uri or path
Hi,
Question
1:
Our customers use
a virtual server (VS) of web proxy. This virtual server is associated to a pool
with four proxies. CARP is configured on the VS profile. I´ve just config...
hooleylist
Jun 15, 2012Cirrostratus
Hi Antonio,
You could use [HTTP::path] or maybe it would be more ideal to parse the domain of the host instead so that all requests for example.com go to the same proxy. You could also handle IP addresses in the host header and requests without a host header value:
Check if Host header is present and not an IP address
if {[string match -nocase {*[a-z]*} [HTTP::host]]}{
Persist on the last two fields of the domain
https://devcentral.f5.com/wiki/iRules.domain.ashx
persist hash [domain [HTTP::host] 2]
} elseif {[HTTP::host] ne ""}{
Host header value is an IP
persist hash [HTTP::host]
} else {
Host header value is blank so persist on the path
persist hash [HTTP::path]
}
Aaron
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