the request will be for example.com/robots.txt, so you have two problems to solve. the first is to make sure that request gets redirected to the correct resource. the 2nd is to test and make sure the SE's will follow a redirect to robots.txt.
Well, I just checked with Google and will not accept any location other than <my-site>.com/robots.txt.
Fortunately, despite the redirect, accessing <my-site>.com/robots.txt directly is not a problem at all (given correct file access premissions, e.g. 644 on Linux) -Google was able to access it as well as my browser.