Block visitors based on geographic location conditionally in .htaccess on multi-site install I have a Drupal 6 multi-site install that runs numerous different websites for a single instance of Drupal. These web sites attract worldwide traffic which is what my client wants, with one exception.

One of the sites attracts lots of visitors from Italy, which my client doesn't want as it creates problems for them. As I result of this I would like to block visitors from Italy visiting the site by blocking them based on IP addresses (note that I already have the IP addresses and the method of blocking the visitors). The way I want to block the visitors is in the .htaccess file like so:

&lt;Limit GET HEAD POST&gt;
order deny,allow
deny from 2.16.70.0/23
deny from 2.19.16.0/20
etc...
allow from all
&lt;/Limit&gt;


My issue is that if I put that code into my .htaccess file, it will block visitors from Italy visiting each of the websites in the multi-site install, which I don't want. I simply want to block them on a particular website, perhaps based on the URL or something. Can anyone point me in the right direction?
You can add this restriction directly in the vhost of your client instead of .htaccess. At that level you should hace a vhost per site.