For various reasons, such as cookies, SEO, and to keep things simple, I would like to make apache automatically redirect any requests for http://www.foobar.com/anything to h
Use an .htaccess file with some mod_rewrite rules:
RewriteEngine On
RewriteRule ^www.SERVERNAME(.*) http://SERVERNAME$1 [L,QSA]
I'm not sure I got the syntax right with the $1 there, but it's well documented. L sends a location: header to the browser, and QSA means Query String Append.