更新时间:2023-12-03 08:41:10
您不能(可靠)。
无论是直接或视为< IMG>
标签,浏览器仍然发出请求 http://yoursite.example.com /upload/image.png
,这两个请求将基本上是相同至于服务器而言。
Whether viewed directly or as an <img>
tag, the browser still makes a request to http://yoursite.example.com/upload/image.png
, the two requests will basically be identical as far as the server is concerned.
现在在大多数浏览器,从请求的&LT; IMG&GT;
标记将伴随着引用站点:
HTTP头,你可以使用你的Apache配置来过滤这些请求,但是:
Now in most browsers, the request from the <img>
tag will be accompanied with a Referer:
HTTP header which you can use in your Apache config to filter those requests, however:
卷曲-e'http://my_referer.example.com http://yoursite.example.com/upload/image.png