I'm thinking the same thing, that the problem is not so much in Perl but with the way that IIS performs redirection (unless you are using Perl to perform the redirection).
Have you thought of setting up Apache with a Virtual server name that is the same as A (which shouldn't conflict as long as it doesn't have to pass information back to the real server) should a redirection occur?
I'm installing IIS now. I'll fire up apache on linux and see if I can get it to pretend to be another machine. Won't be able to get to it all today because I have to do some Java training for staff members in about twenty minutes, but I should have some sort of answer (even if it's "hell, I don't know!") by tomorrow some time.