Forum Discussion
Yugandhar
Nimbostratus
Mar 14, 2019To 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::re...
Rico
Cirrus
Mar 14, 2019This should work
when HTTP_REQUEST{
if { [string tolower [HTTP::host] ] equals "myabc.wxy.com" } {
HTTP::header replace Host "replace.wxy.com"
}
}
when HTTP_RESPONSE {
if { [string tolower [HTTP::host] ] equals "replace.wxy.com" }{
HTTP::header replace Host "myabc.wxy.com"
}
}
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