Forum Discussion
Monty_152734
Apr 04, 2017Nimbostratus
Redirect on multiple conditions URI & Query
Hi Guys,
This is my first time at DevCentral.
I need help. The requirement are when f5 see URI ( https://abc.xyz.com/shop/window.yes) and query (car=true) then redirect to url (https://abc.xyz.c...
Stanislas_Piro2
Apr 05, 2017Cumulonimbus
Hi,
Are PATH and QUERY in irule real ones?
In your examples and irules, you wrote:
- cart=true
- car=true
- car=ture
the following irule may work for car=true
when HTTP_REQUEST {
switch -glob -- [string tolower [HTTP::path]] {
"/shop/window.yes" {
if { [string tolower [URI::query [HTTP::uri] "car" ] ] equals "true" } {
HTTP::redirect "/shop/door.yes?[HTTP::query]"
}
}
"/shop/* {
pool example-pool
persist none
}
}
}
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