things i have to date is:

<VirtualHost 111.111.111.111:80>
     ServerName ex.me
     ServerAlias www.ex.me

     Options +FollowSymLinks
     RewriteEngine on
     RewriteRule ^/(.*)$  http://exemple.com/foo/$1 [R=301,L]
</VirtualHost>

things i require is if (.*) is empty, it rewrites to http://exemple.com and when it's something, it redirects to http://exemple.com/foo/$1 -- I'm not sure how you can perform the if empty rule. at this time. At this time it redirects to http://exemple.com/foo/ whether there's something taken or otherwise.

Interesting help

 RewriteRule ^/$  http://exemple.com/ [R=301,L]
 RewriteRule ^/(.+)$  http://exemple.com/foo/$1 [R=301,L]