Multiple domains issue

It is rather easy to make WP think it is served from different domain by defining WP_HOME and WP_SITEURL constants in configuration dynamically for request. See Editing wp-config.php in Codex for details.

However this only affects dynamically generated elements. Everything that is part of content isn’t modified by this, including but not limited to content of posts.

Depending on your setup (server, caching, etc) it might be approached on different levels — from filtering inside WordPress to buffering and rewriting page on PHP level, and so on.