Forum Discussion
JG
Apr 05, 2017Cumulonimbus
Try this one:
when HTTP_REQUEST {
log local0. "URI in: [HTTP::uri]"
if { ([string tolower [HTTP::path]] starts_with "/shop/window.yes") and \
([string tolower [URI::query [HTTP::uri]]] equals "car=false")} {
log local0. "Matched: Path: [HTTP::path]; Query: [URI::query [HTTP::uri]]"
HTTP::redirect "/shop/door.yes?car=true"
}
if { [string tolower [HTTP::path]] starts_with "/shop/" } {
log local0. "Not matched: Path: [HTTP::path]; Query: [URI::query [HTTP::uri]]"
pool example-pool
persist none
}
}
[Edited to include logging.]