We can use rewrite rules if you can identify the types of URLs that you want to allow on otherdomain.com. For example, if all images / js are contained in specific directories then you can use rewrites to white list those directories and redirect everything else. I just need example URLs from you.

One more question.
When I go to data.otherdomain.com it shows my forum index, all the forum links are pointing to the main domain. But the index is still duplicate content. Do you think there is a solution for this? Is it bad? Or should i leave it like that?