Forum Discussion
Ryan_M
Nimbostratus
Mar 17, 2008http::host is not populated
It's my first iRule, and I know the answer's going to make me feel stupid, so please be gentle...
I'm trying to do a simple redirect to https. I created two virtual servers with the same IP...
hoolio
Cirrostratus
Mar 17, 2008The host is a value the client should set (optional in HTTP 1.0, required in HTTP 1.1) to indicate which web application on the web server it is making a request to. The idea was to allow servers to support multiple web applications without needing a separate IP address and port per web app. So yes, the client is supposed to tell the server which host it's making the request to. I would guess that you're web server is setting the HTTP_HOST CGI variable to the default HTTP host on the server if the client doesn't specify a host. Most clients (ie, all modern browsers) will specify the fully qualified domain in the address bar for a request in the HTTP host header, so this shouldn't really be an issue in most cases.
There isn't a simple way to determine what the default host of the web server is from an iRule on the BIG-IP. If you're opposed to using the VIP's IP address in the redirect, your next best option would probably be to hard code the host to use in a redirect if the client doesn't specify it in their request.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
