We have a Symfony2 application that we wish to serve from two different domains. Here's how we want it to work;
Suppose we have two domains and two virtual hosts set on our server (we're using apache) - for the sake of argument, let's call them www.first.com and www.second.com.
Suppose the Symfony2 is hosted under the vhost for www.first.com and everything works fine.
When someone browses to www.second.com/login, for example, we wish to serve the page that can be found at www.first.com/second/login, so any request for www.second.com/* serve the page that Symfony would generate if the url was www.first.com/second/* - but, from the point of view of the user, everything should look as though it is coming from www.second.com - including cookies and web-assets.