You are not making it up. I presume that you have children, and the reason for the court ruling was because your xh opposed it on the grounds that it would affect his contact with the children? So in other words, the court ruling wasn't specifically one preventing you yourself from moving, but based on the arguement that for you to move with your children was not in their best interests?
Assuming this was the case, he court should make a decision based on what is in the best interests of the children and their welfare - obviously I can't comment on the decision in your case, but presumeably xh was able to sufficiently satisy them that it was best for the children's welfare to be where they are rather than where you were intending to go. Are the children old enough that the court spoke to and took their view into consideration?
If you feel that the decision was unfair, can you appeal it? If you were unhappy with the way your case went, are you happy that your solicitor put forward your case well enough or do you need to consult another solicitor?
It is one of these things that people would say "that can't happen" to but it can, and does - however as a generalisation, it can be unusual for courts to prevent children moving away with the parent whom they reside with unless it would have a significant detrimental affect upon their welfare, even though it might prevent an xh from seeing them so often. Perhaps you were planning to move to another country?
Hope I am not barking up the wrong tree. I should also say that I used to deal with family law a lot but not so much in recent times, and the law is forever "evolving".