I have a Drupal 4.5.0 site installed, but can't find a way to get the configuration I want. I have several subdomains (a.example.com, b.example.com..etc) plus a main domain (www.example.com). Each subdomain has a corresponding taxonomy term (a, b..etc).

So far, I have the subdomains all 'working' using seperate config files; I have everything set the same except the base URL, so right now, they're just copies of the same site that show all content. What I want is for the subdomains to only show content from the corresponding taxonomy term (and in fact, to deny the existence of the other terms when creating content..etc so that a user using a.example.com can't accidentally submit content to term b) - much like the taxonomy permissions module, except based on the domain rather than the user role.

The reason why I can't do this using a partially shared database (my database is totally common) is because I want the main domain to be able to show any and all taxonomy terms - it has to be able to access all the content. The result would have a categorisation system very like Slashdot, where the main page shows all categories and the subdomains (apple.slashdot.org..etc) only show one category and its subcategories.

Is there a way to do this using URL rewriting? I don't want just the front page to change for each site, but all references to nodes (as with taxonomy permissions). If not, any suggestions where I should start hacking? ;)

Thanks in advance for suggestions...