Forum Discussion
satish_txt_2254
Nov 01, 2017Cirrus
iRules base on URL matching
I have following irules and its working but now i have requirement to match URL developers and developer (without "s") so how do i match that string? also i want to redirect developers.vivox.com (bot...
crodriguez
Nov 01, 2017Ret. Employee
A lot depends on how you have your associated virtual servers configured. If you have two virtual servers, one listening for HTTP traffic and the other listening for HTTPS traffic, you could put the redirect iRule only on the HTTP virtual server and this iRule on the HTTPS virtual server. With respect to checking for both "developer.example.com" or "developers.example.com" you can use a single compound IF condition or an IF/ELSEIF structure. For example:
if { [string tolower [HTTP::host]] equals "developers.example.com" || [string tolower [HTTP::host]] equals "developer.example.com" } {
pool DEV_pool
} else {
pool QA_pool
}
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