Drupal 8 css and images relative to root
Core actually did exactly that change just a few days ago, it will be like that in 8.0.3.

That said, your set up looks problematic to me, that's not going to be the only thing that somehow relies on the domain name. Usually the same domain is used?