Forum Discussion
John_45559
Nimbostratus
Jun 15, 2010Manipulating host: XXX.XXX.XXX in http POST header
I need to change the host:xxx.xxx.xxx field to the endpoint on a http request. I have been attempting to look at the wiki for syntax but I am forced to use IE6 which crashes every time I access IRul...
Michael_Yates
Nimbostratus
Jun 15, 2010If I am understanding what you need correctly this should get you started.
This should capture the "bad ip address" that is being sent in the redirect and allow you to replace it with a specific ip address "good.ip.address.or.url". You will have to hard code it using this example, but if it does what you need then you can modify it further to be more dynamic.
when HTTP_RESPONSE {
if { [HTTP::is_redirect] and [HTTP::header Location] contains "bad.ip.address" } {
HTTP::header replace Location [string map -nocase {bad.ip.address good.ip.address.or.url} [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