title: Blocking access to a folder through http
body: <p>I hope this question is not redundant, but I could not find any answer to the exact question I am asking.</p>
  
  <p>I own a multiple site shared hosting plan on a Linux server.
  The hosting plan refers to a domain that we can call www.domain1.com</p>
  
  <p>Every other domain is hosted as a subdir of the main domain. so for example domain2.com will be hosted like: www.domain1.com/domain2.com/</p>
  
  <p>It could be reached using that path or using www.domain2.com directly.
  I want to disable the access to domain2.com as subfolder of domain1.com.</p>
  
  <p>I suppose I need to put a .htaccess file in every subfolder of domain1.com which is hosting a website. Am I correct? What do I have to put in the .htaccess file?</p>
  
  <p>thank you in advance,
  Max</p>