停止从其他域访问网站内容
如何停止从其他域访问我的网站内容 [如图像、swf、页面等]? 假设我的服务器中有一个 myflash.swf 文件,其实时 url http://www.mydomain .com/flash/myflash.swf 。我希望任何其他域都无法使用实时 URL 访问此 Flash。有可能吗? 提前致谢。
how can i stop accessing my website content [like image,swf,pages etc.] from other domain?
suppose my server has a myflash.swf file in my server with live url http://www.mydomain.com/flash/myflash.swf . i want this flash can't be accased by any other domain using the live url. is it possable?
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您希望禁用HotLinking,这些链接可能会帮助您:
If its HotLinking that you wish to disable, these links may help you:
有一个称为 Referrer 的 HTTP 标头。它通常包含请求下载 swf 的站点。
当 Referrer 值与您的域名名称匹配时,您就可以提供内容。否则拒绝。
There is a HTTP header called referrer. It usually contains the site which request your swf to download.
When the Referrer value matches your domain name name, you can serve the content. Otherwise reject it.