title: how to only allow one domain to access files and folders in another domain
body: <p>There are a set of folder in</p>
  
  <p>/var/www/vhosts/abc/content.abc.com.au/httpdocs/ folder</p>
  
  <p>Ex:</p>
  
  <p>/var/www/vhosts/abc/content.abc.com.au/httpdocs/62199911-74c61aaf688c0d374f23253218a12a9b81eaba4c</p>
  
  <p>/var/www/vhosts/abc/content.abc.com.au/httpdocs/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d</p>
  
  <p>I can access files in above folders using this url:</p>
  
  <p><a href="https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eaba4c/index.html" rel="nofollow noreferrer">https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eaba4c/index.html</a>
  <a href="https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d/index.html" rel="nofollow noreferrer">https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d/index.html</a></p>
  
  <p>I want to prevent direct access for those urls.</p>
  
  <p>Then,</p>
  
  <p>I have another php file in this(/var/www/vhosts/xyz/anothercontent.pqr.com.au) folder  named as "pdfview.php".</p>
  
  <p>We can access the file using this url: <a href="https://abc.sample.com.au/pdfview.php" rel="nofollow noreferrer">https://abc.sample.com.au/pdfview.php</a>
  The "pdfview.php" file contain this iframe:</p>
  
  <pre><code>&lt;iframe src="https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d/index.html" allowfullscreen="" style="width:100%;height:100%;" frameborder="0"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>I want to access below urls only through the iframe in "pdfview.php" page in this (<a href="https://abc.sample.com.au" rel="nofollow noreferrer">https://abc.sample.com.au</a>) domain, 
  do not need to access in any other domain.
  <a href="https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eaba4c/index.html" rel="nofollow noreferrer">https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eaba4c/index.html</a>
  <a href="https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d/index.html" rel="nofollow noreferrer">https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d/index.html</a></p>
  
  <p>I have tried to find a way to do this using htaccess file. but could not. is there a way to do that using htaccess or using php</p>