Forum Discussion
Vijay_E
Nov 11, 2019Cirrus
This hasn't been tested but roughly a framework for you to refine it. You would have to use this on the VS serving site2.com:
when HTTP_REQUEST {
if { [HTTP::host] equals "site2.com" } {
HTTP::header replace "Host" "site1.com"
virtual site1_Virtual-Server
return
}
}
This would have to go in the virtual server for site1.com:
when HTTP_RESPONSE {
if { [HTTP::header values Location] contains "site1.com" } {
HTTP::header replace Location [string map {"site1.com" "site2.com"} [HTTP::header value Location]]
}
}