阻止直接访问页面

时间:2016-01-24 15:53:16

标签: javascript php

我有一个安装了php的nginx服务器。我想禁用直接访问某些php / html页面。但是,我想在我自己网站的iframe中显示这些页面。例如:

mysite.com/test.html (direct access is blocked)
<iframe src="mysite.com/test.html/"></iframe> (this will show the page on my site)
<iframe src="OTHERSITES.com/test.html/"></iframe> (cannot show contents)

我想在php中做到这一点。但是,如果在php中无法做到这一点,我可以使用javascript解决方案。

0 个答案:

没有答案
相关问题