1

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:

<Limit GET HEAD POST>
order deny,allow
deny from 2.16.70.0/23
deny from 2.19.16.0/20
etc...
allow from all
</Limit>

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?

2

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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