Serving a different theme based on url

Is it possible to serve a different theme based on the url which is being used to access your site?

This would be to enable multi-tenancy. So the scenarios would be:

  1. http://client1.com would point to the site config and css in /user/themes/client1/
  2. http://client2.com would point to the site config and css in /user/themes/client2/