That is strange how that both urls are valid. All that's in the subdomain folder is an index file, an image folder, and the zenphoto 'gallery' folder. So if it does have to do with the subdomain, wouldn't it have to be on the server side, how they set up the mysql database??
Where is zenphoto pulling that href from? Is there not a file in zenphoto with code that controls what href shows up on the on the gallery, album, and image pages?