Forum Discussion
Michael_Yates
Jun 15, 2010Nimbostratus
If 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]]
}
}