Ryan_M
Mar 17, 2008Nimbostratus
http::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, one on 443, one on 80. The VS on 80 has this iRule applied:
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
However, when I try to access this server, I get this HTTP response:
GET /test.html
HTTP/1.0 302 Found
Location: https:///test.html
Server: BIG-IP
Connection: close
Content-Type: text/html
Content-Length: 0
HTTP::uri is working alright, so why is HTTP::host staying blank? If I replace [HTTP::host] with a static hostname, the redirect works properly.
The web application is seeing a proper HTTP_HOST, so from what I can tell, nothing's getting mangled. The only unusual thing about this we don't have a reverse DNS entry for this system (but that shouldn't matter, right?).
Thanks,
Ryan