Where should I place .htaccess to take effect in a particular site? We have an Apache web server that contains several Drupal 7 installations. Where should I place a .htaccess file in order for its contents to take effect on a particular website? 

I tried putting it here /opt/apache/var/www/html/drupal-7.19/sites/thewebsitename but it didn't work.
If you have a multi-site Drupal installation (ie. folders other than 'all' and 'default' in your /opt/apache/var/www/html/drupal-7.19/sites/ directory), then you cannot have a separate .htaccess file for each site, and must place your changes in the common .htaccess which should already exist in /opt/apache/var/www/html/drupal-7.19/. Note that as these changes will apply to all of your multi-sites, you need to ensure your rules don't break sites you're not interested in.

If you have a more traditional installation of one site per one Drupal instance, then you'll still be modifying the same .htaccess file in /opt/apache/var/www/html/drupal-7.19/, but don't have to worry about breaking other sites.