Forum Discussion
Stanislas_Piro2
Nov 26, 2015Cumulonimbus
Hi,
Your irule had bad structure... you created two filters with the same URI...
can you try this irule:
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
store lang parameter, blank is not present
set lang [URI::query $uri lang]
if { [HTTP::cookie exists "NEWWEBSITE" ] && [HTTP::cookie value "NEWWEBSITE"] equals "1" } {
switch -glob $uri {
"/new-path/*" {
log local0. "cookie exists NEWWEBSITE and /new-path"
if { $lang equals "fr" || $lang equals "it" }{
log local0. "contains lang [HTTP::uri], pass to ORIGNAL-WEBSITE"
pool ORIGNAL-WEBSITE
}
}
"*/assets/scripts/*" -
"*/assets/styles/*" -
"*/assets/fonts/*" -
"*/media/*" {
log local0. "contains path [HTTP::uri], pass to NEW-WEBSITE pool" pool NEW-WEBSITE
log local0. "Pass to NEW-WEBSITE [HTTP::uri]"
}
default {
pool ORIGNAL-WEBSITE log local0. "pass to ORIGNAL-WEBSITE [HTTP::host][HTTP::uri]"
}
}
}
}