Solution:
I tried and tried to get relative URLs to work and ended up using a filter with a replacement. In the template’s functions.php, you can use something similar to:
/*********** URL replacement for relative *****************/
add_filter( 'site_url', 'custom_site_url' );
add_filter( 'home_url', 'custom_site_url' );
function custom_site_url( $url )
{
if( is_admin() || $_SERVER["HTTP_HOST"] == 'example.com' )
return $url;
return str_replace('example.com', '', $url);
}