Forum Discussion
Vijay_E
Jun 25, 2016Cirrus
Client sends "abcd.com", it is changed to "xyz.com" and sent to servers. Reply from servers is "xyz.com" and it is changed to "abcd.com" and sent to clients.
Use this as an example and modify it to suit your requirements:
when HTTP_REQUEST {
if { [HTTP::host] contains "abcd.com" } {
HTTP::host [string map {abcd.com xyz.com} [HTTP::host]]
}
when HTTP_RESPONSE {
if { [HTTP::header values Location] contains "xyz.com" } {
HTTP::header replace Location [string map {xyz.com abcd.com} [HTTP::header value Location]]
}
}