title: how to Allow hotlinking from other subdomain in .htaccess
body: <p>I want to deny hotlinks for some files from other sites , but allow it to sub-domains of the same domain </p>
  
  <p>I have written this code which is work great , but the problem is that it block my other sub-domains </p>
  
  <pre><code>RewriteCond %{HTTP_REFERER} !^$
  RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"  [NC]
  RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
  </code></pre>
  
  <p>the problem is when a visitor visit www.myDomain.com and requests an image in sub.myDomain.com the hotlink is disallowed</p>
  
  <p>please note thea the domain name is a variable (so I have to use something like %{HTTP_HOST})</p>