what I have so far 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>
what I need is if (.*) is empty, it rewrites to http://exemple.com and if it has something, it redirects to http://exemple.com/foo/$1 -- I don't know how to do the if empty rule. right now. Right now it redirects to http://exemple.com/foo/ no matter if there is something captured or not.
Thanks for your help