Forum Discussion
Habib_Ulla_Khan
Nimbostratus
Apr 24, 2017If list of uri requested..Redirect to https and select pool
Hi All,
I have list of uri's which are around 100 plus (example:en-*) . whenever there are request with this uri, its should get redirected to https and pool should be selected. Currently using bel...
Snl
Cirrostratus
Apr 24, 2017Try below options
Code-
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/in/*" {
HTTP::redirect "http://New_http_URL_1"
}
"/us/*" {
HTTP::redirect "http://New_http_URL_2"
}
"/uk/*" {
HTTP::redirect "http://New_http_URL_3"
}
"/sg/*" {
HTTP::redirect "http://New_http_URL_4"
} } } option 2
Code
when HTTP_REQUEST {
log local0. "uri info: [HTTP::uri]"
switch -glob [string tolower [HTTP::uri]] {
"/corp*" { pool corp }
"/corp/" { pool corp }
"/MBSP/" { pool mbsp }
default { pool nbqpool }
log local0. "pool info: [LB::server 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
