We have found this problem casually.
A label in a course had the HTML tag <base href="OLDMOODLESITE"> (maybe copy&pasate from OLDMOODLESITE) and of course all the link in the course (main web page) has stopped to work.
Since OLDMOODLESITE doesn't exist anymore, the error was evident, but if someone put in a label the tag BASE that point to to another website, this alter all the (relative?) links present in that page/course.
I think that the solution should be filter this tag.
Thank you.