Forum Discussion
Stanislas_Piro2
Jun 20, 2018Cumulonimbus
Your code is from this link where Leonardo answered.
Does it mean this code never worked since september?
If the redirect is on the same server but to a subdirectory, redirect to a relative URL instead of absolute URL
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains "example.com" && [HTTP::path] eq "/" }{
set country [whereis [IP::client_addr] country]
switch $country {
"US" -
"UK" -
"CA" - { HTTP::redirect "/${country}" }
}
}
}