[英]how to only allow one domain to access files and folders in another domain
在其中有一組文件夾
/var/www/vhosts/abc/content.abc.com.au/httpdocs/文件夾
例如:
/var/www/vhosts/abc/content.abc.com.au/httpdocs/62199911-74c61aaf688c0d374f23253218a12a9b81eaba4c
/var/www/vhosts/abc/content.abc.com.au/httpdocs/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d
我可以使用以下網址訪問上述文件夾中的文件:
https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eaba4c/index.html https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d/index.html
我想防止直接訪問這些網址。
然后,
我在此(/var/www/vhosts/xyz/anothercontent.pqr.com.au)文件夾中還有另一個php文件,名為“ pdfview.php”。
我們可以使用以下網址訪問文件: https ://abc.sample.com.au/pdfview.php“ pdfview.php”文件包含以下iframe:
<iframe src="https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d/index.html" allowfullscreen="" style="width:100%;height:100%;" frameborder="0"></iframe>
我只想通過此( https://abc.sample.com.au )域中“ pdfview.php”頁面中的iframe訪問以下網址,而無需在任何其他域中進行訪問。 https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eaba4c/index.html https://content.abc.com.au/62199911-74c61aaf688c0d374f23253218a12a9b81eab12d/index.html
我試圖找到一種使用htaccess文件執行此操作的方法。 但不能。 有沒有辦法使用htaccess或使用php
如何修改.htaccess文件。
Order Deny,Allow
Deny from all
Allow from 100.100.100.100
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.