Forum Discussion
Michael_Sproul1
Nimbostratus
Nov 08, 2019URL client-side Redirect with URI intact
URL site1.xxx.gov directs in DNS to VirtualServer1 and goes to a default pool. URL site2.xxx.gov currently directs in DNS to VirtualServer2 and goes to a different default pool. Customer has reques...
Vijay_E
Cirrus
Nov 11, 2019This 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]]
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects