I think what you're looking for is this patch:
It's against Drupal 6/7, but one of the earlier files is against D5, give or take some bad line endings that you can easily fix up. :-) I'm using it quite successfully on a D5 site now.
On Monday 14 April 2008, Jacob Roufa wrote:
Hi all,
I have a multisite setup that works great. It allows me two different sites using one Drupal core codebase just as promised. It works better and easier than redirecting to different domain names using Apache Virtual Hosts. However, I have one issue with it. When I create a symbolic link, in the sites folder, for each site (i.e. sitename linked to sitename.domain.tld) so that I can visit it not only by sitename, I am directed to a different site in my browser.
In my browser, when I go to http://sitename and log in, then visit http://sitename.domain.tld I'm not logged in! But they're the same thing, one's just a symbolic link to the other! I really am confused and wondering if this is proper behavior because it doesn't seem like it.
Thanks!