Forum Discussion
JHally_43299
Aug 16, 2012Nimbostratus
HTTPS iRule to map requests to different pools
Hi All, I have a virtual which I want to direct default traffic to PoolA, but any requests for a specfic directory to another pool. I can do this currently with the following iRule on a vir...
Gbps_31870
Aug 16, 2012Nimbostratus
Hi JHally,
Yes it should work for both HTTP and HTTPS in the case you mentioned, try the below iRule in both HTTP and HTTPS
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] contains "somedomain.com"} {
switch -glob [string tolower [HTTP::uri]] {
"/dir1/*" { pool dir1-pool }
default { pool default-pool }
}
}
}
Aaron (hoolio) has highlighted very important point if you have an iRule selecting a pool, to enable OneConnect profile to the VS to ensure each HTTP/HTTPS request is load balanced to the correct pool.
the post: https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aft/2163946/showtab/groupforums/Default.aspx
the link: https://devcentral.f5.com/wiki/AdvDesignConfig.ONECONNECT.ashx
HTH
BR,
Abdul
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