I need to rewrite and redirect all access to a directory to another host. I'm using Symfony2 framework and the .htaccess is in the /web directory (also the root of the virtualhost) and looks like:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
I want all access to http://www.project1.com/foo redirected to http://www.project2.com/bar
How can I do that with htaccess?