HG
Oct 10, 2017Cirrus
Rewrite Host Header i-rule question
Hi all. I'm interested in changing the Http host header when an http request occurs. I searched a little bit and I found out that this can be achieved by using an i-rule.For example.
when HTTP_REQUEST {
if { [HTTP::host] eq "test1.image.com" } {
HTTP::header replace Host "www.image.com"
}
}
or
when HTTP_REQUEST {
if { [HTTP::header host] eq "test1.image.com" } {
HTTP::header replace Host "www.image.com"
}
}
I don't know which of the above will do the trick for me.The outcome of the above will be that the client will have on his internet browser bar appeared ? In case the answer is yes then everything will be ok. In case the answer is no then I assume that a header replacement will be needed as well on the http response. I know the answer is simple nut I have no access on a lab env atm and Im stuck. Thanks