Forum Discussion
pool selection base on Browser and Linux server requests?
I was trying to make this work however unsuccessful so far, it works only if request comes from IE or Firefox but fails of request s from Linux server. Thank you
in short I am trying to select pool members if request comes from linux send it to pool 1 other wise send to pool 2.
below Irule didn't work for linux server requested.
when HTTP_REQUEST { switch [string tolower [HTTP::host]] { "example.com" { switch -glob [string tolower [HTTP::uri]] { "/test" { pool test-Apache_SAT_9443_Pool } "/my" { pool my-Apache_SAT_9443_Pool } default { pool Apache_SAT_8443_Pool } } } }
}
I also tried below irule no help either.
when HTTP_REQUEST { set lowercaseuri [string tolower [HTTP::uri]] switch -glob $lowercaseuri { "/test" { HTTP::redirect "https://example.com[HTTP::uri]" } "/my" { HTTP::redirect "https://example.com[HTTP::uri]" } } } }
Thank you.
2 Replies
- Andy_McGrath
Cumulonimbus
Confused what you are trying to do, your iRule is selecting a pool based on the URI of the HTTP Request and not looking for anything to identify the client's OS.
If you are looking to identify the client's OS or browser need to look at the User-Agent string HTTP header in the request.
- KJ_50941
Nimbostratus
Thank you , using User-agent worked.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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