Forum Discussion
In APM Customization, server's HTTP_HOST variable not set correctly? Any other way to get this?
I'm attempting to do some APM customization, and I'm trying to write some simple PHP that will substitute text on the page based on the Host header in the HTTP request (we are using this same policy on multiple virtual servers for multiple sites, and everything is identical except for some tiny verbiage changes on the logon page... I know I could probably break this into multiple policies, but I'd rather just have one so I don't have to manage multiple).
Anyway, in trying to determine which site has been requested, I want to make a decision based on the Host header. I attempt to read it like this:
It turns out that the value of $_SERVER['HTTP_HOST'] is "f5-server". I would understand that if I had asked for 'SERVER_NAME' rather than 'HTTP_HOST', but that's definitely not right for HTTP_HOST and is not what the user had in their host header.
Does anyone have any idea about other ways to get the host header in PHP, or ways to get the Big-IP to correctly return it?
- Algebraic_MirrorCirrostratus
Maybe it's my version then. I'm still on 11.5.3 HF2, and it doesn't work for me here.
Recent Discussions
Related Content
* 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