John_Glass_3854
Sep 13, 2006Historic F5 Account
Modification of http response header when using HTTP::redirect
Hello,
I think I'm trying to do something very basic - redirect all HTTP traffic for a given virtual address to the HTTPS virtual server. I found SOL3847 at Ask F5, which appeared to be exactly what I was looking for. (I'm running 9.2.2)
rule redirector {
This iRule redirects all HTTP traffic to
the SSL virtual. From tech.f5.com SOL3847.
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
The issue is that using this rule alone results in an HTTP response header being sent back to the client indicating:
"Server: BIG-IP"
I would like to replace "BIG-IP" with "Company Name". Usually, I accomplish this via:
when HTTP_RESPONSE {
HTTP::header replace Server "Company Name"
}
However, it appears as though the HTTP_RESPONSE test is not being met when the redirect is issued directly from the BIG-IP.
Is there a way to replace the Server response header in iRules - or is that a potential stream profile candidate?
Finally, the redirect issued is a 302. Any idea why a 301 is not being sent for what is effectively a permanent situation?
Thanks,
InfoMonkey