Apache/htaccess - password protect a site by domain name

view story

http://serverfault.com – How is it posible to protect a website if the site was called by a given domain name? e.g. www.domain.com -> no password protection www.domain.net -> password protection Both of the URLs are routed to the same document root. (HowTos)