Forum Discussion
PeteWhite
Sep 14, 2018Employee
when HTTP_REQUEST {
if { [HTTP::host] eq "123.abc.com" and [HTTP::uri] contains "/xyz/" } {
if {[string tolower [HTTP::uri]] contains "/xyz"}{
set uri [string range [HTTP::uri] 4 end]
HTTP::uri $uri
HTTP::header replace host "www.google.com"
pool testGoogle
log local0. "[IP::client_addr]:[TCP::client_port]: Replacing Host with http://[HTTP::host][HTTP::uri]"
}
}
}
Presumably it doesn't rewrite the URI after the change because the host header of no longer matches 123abc.com. Why aren't you just using a redirect to