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:

order deny,allow
deny from
deny from
allow from all

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?

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.