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...
Hectorm
Nimbostratus
Apr 24, 2017you will need two VIPS one VIP for port 80 or HTTP and another VIP for the HTTPS. So in the VIP for port 80 you can put a very similar rule as the one for the pool. something like this when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/en/*" { set VRedirection "true"}
"/coxtnt/*" { set VRedirection "true"}
"/asts/*" { set VRedirection "true"}
"/etc/*" { set VRedirection "true"}
"/pr/web/*" { set VRedirection "true"}
"/libs/*" { set VRedirection "true"}
"/ptc/*" { set VRedirection "true"}
"/en-/" { set VRedirection "true"}
default { set Vredirection "false" }
}
if { $Vredirection equals "true" } then { HTTP::redirect "https://[HTTP::host][HTTP::uri]"}
}
This rule will only redirects specifics uri. Then on the HTTPS rule you can do the pool selection just like you have done
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
