Forum Discussion
Neil_Harbaruk_1
Nimbostratus
Aug 01, 2006iRule for https:URL:<port>/URI
I am looking for a script to forward based on any combination of URL:/URI.
e.g. https://web1.whatever.com:8081/money --> pool1
https://web1.whatever.com:8081/coins --> pool1
https://web2.whatever.com:8082/coins --> pool2
https://web3.whatever.com:8082/coins --> pool3
If using nested else-if statements, i'd like to use the url's web1, web2, web3 as the main selection criteria. For each group of web1, 2, 3, there will be a whole bunch of web1, 2, 3 statements which will be have either different port numbers or different uri's (or both)
I have not scripted anything in years, so please bear with me.
I appreciate any assistance on this.
- hoolio
Cirrostratus
Hi,when HTTP_REQUEST { switch [HTTP::host] { "web1.whatever.com" { log local0. "Detected web1.whatever.com" pool pool1 } "web2.whatever.com" { log local0. "Detected web2.whatever.com" pool pool2 } default { log local0. "Using default pool" use pool http-pool-myasp } } }
- Neil_Harbaruk_1
Nimbostratus
Depending on which URL and/or which port, and/or which URI, the pool selection would be made. The common thing is the URL. I was looking at nested else-if statements to do this. - hoolio
Cirrostratus
The rule would be the same for HTTP or HTTPS, as BIG-IP will need to decrypt the traffic to read the host for the request.
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