Personally, I'd use a database to store which domain should use which query vars. As soon as someone enters a new domain, you'd have to check which (if any) you should allow. For example in your youtube link there could be session/language/etc query vars, which you don't need. I don't think there is a fail proof way to automate this.
pritaeas
Posting Expert
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875