Change domain in entry.url
You could use the Craft/Twig |replace filter, which supports regex replacements.

Something like:

{% set handle = entry.section.handle %}

{% if handle == 'subSiteSectionHandle %}
    {% set newUrl = entry.url|replace('/regexMatchPattern/', 'replacedWith') %}
{% endif %}