Yugandhar
Mar 14, 2019Nimbostratus
To replace Hostname in HTTP Request and HTTP Response
Hi,
Can we use the following iRule to replace the hostname in the HTTP Request and HTTP Response.
when HTTP_REQUEST{
if { [string tolower [HTTP::host] ] equals "myabc.wxy.com" }{
HTTP::replace replace Host "replace.wxy.com"
}
}
when HTTP_RESPONSE{
if { [string tolower [HTTP::host] ] equals "replace.wxy.com" }{
HTTP::header replace "myabc.wxy.com"
}
}
Thanks,
Yugandhar.