You're unnecessarily complicating things. If you've got "differences relating to virtual hosts, ssl, etc" then FIX THOSE. When you start bodgying things up with cookies and query string args (are you going to modify your application to persist that query string arg through every request? Even more complications...) you just make things more complicated, which means more difficult to debug, more likely that it'll be accidentally broken by an unrelated change, and generally you just make life difficult for yourself and everyone else.
So, take a step back, and instead of asking about implementing a half-baked solution you've come up with, ask a question about how to solve your problem. "We have an haproxy, and would like to access the machines directly, but when we do this we get (describe difference with virtual hosts)."
My guess for your vhosts problem is that they're not setup to accept the machine's name directly, which is trivial to fix -- an extra entry in
server_name (or a new
ServerAlias) gets you away there. For SSL, that's a smidge trickier if you're not using a wildcard cert, but since it's only internal users, ignoring the SSL warning is a (semi-)valid solution to the problem -- or you can just run a separate SSL cert for the per-machine stuff (on an internal CA). If you're terminating SSL on the load balancer, stop doing that then.