It seems I ‘ve found a way to solve this problem. I don’t know why it works, but it does. I’ve deleted the index.php from the domainB directory and copied/pasted the index.php from one of my other wordpress sites running as subdirectory of domainA. That did the trick. As I said, I don’t know why, but apparently there was a bug in the original index.php