Set config.absRefPrefix = http://www.yourdomain.com/sub/path/
. That will prefix any properly generated site-root relative links with the domain.
There may be an alternative way using domain records (Linking across domains in multidomain-sites does exactly what you want), but I can't point you to anything there.