PHP - 阻止来自其他域的请求
我有一些像这样的链接
http://www.domain1.com/files/domain1.com/files/def.jpg
http://super.domain1.com/files/super.domain1.com/files/abc.jpg
http://www.other1.com/files/other1.com/files/uhj.jpg
这些网站托管在同一托管和共享文件文件夹中。我们使用一个名为网站域名的子文件夹将它们分开。但是,属于domain1.com: 的文件
http://www.domain1.com/files/domain1.com/files/def.jpg
可以通过url 访问
http://www.other1.com/files/domain1.com/files/def.jpg
如何防止这种情况?
I have some links like this
http://www.domain1.com/files/domain1.com/files/def.jpg
http://super.domain1.com/files/super.domain1.com/files/abc.jpg
http://www.other1.com/files/other1.com/files/uhj.jpg
These websites are hosted in the same hosting and sharing files folder. We separate them by using a sub folder named like domain name of website. However, file which belong to domain1.com:
http://www.domain1.com/files/domain1.com/files/def.jpg
can be reach with url
http://www.other1.com/files/domain1.com/files/def.jpg
How to prevent this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
分别为每个域配置虚拟主机到域文件夹。
我在下面发布的虚拟主机配置示例。
Get configure for each domain separately vhost to domain folder.
Example of vhost config i post below.