Forum Discussion
Mohamed_Lrhazi
Oct 15, 2013Altocumulus
Is this logic the same as what you need? would it work better?
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
set uri [HTTP::uri]
if {$host equals "lemons.com" } {
HTTP::respond 301 "Location" "https://www.fruit.com/links/test?[HTTP::query]"
} elseif { $host contains "apples.com" and $uri contains "tree" } {
HTTP::respond 307 "Location" "http://web.fruit.com/tree.aspx"
} else {
HTTP::respond 307 "Location" "https://www.fruit.com[HTTP::uri]"
}
}