Forum Discussion
T_Rajneesh
Nimbostratus
Aug 26, 2019i-rule redirection issue
Hi, I have created a i-rule to redirect the when http host contains siteA, & uri starts with search, sent it to SiteA _3737pool. if http host contains siteA, & uri has 'sales' or FinanceBuyCat...
Aug 26, 2019
Hi T Rajneesh,
Can you try this iRule?
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] equals "sitea.com") or ([string tolower [HTTP::host]] equals "www.sitea.com") } {
switch -glob [string tolower [HTTP::uri]] {
"/search/*" {
log local0. "[HTTP::host] [HTTP::uri] iRule redirect SiteA_3737"
SSL::disable serverside
pool SiteA_3737
}
"*sales*" -
"*financebuycategory*" {
log local0. "[HTTP::host] [HTTP::uri] iRule redirect Finance_443"
pool Finance_443
}
}
}
log local0. "[HTTP::host] [HTTP::uri] iRule no redirect"
# if you use default pool, no need 'pool SiteA_443'
# pool SiteA_443
}If it doesn't work, can you check the logs?
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
