停止直接链接到照片文件夹
我有一个在线照片档案。我的网页受密码保护,但我尚未保护照片文件夹,以阻止人们直接通过URL链接照片。所有照片都是独特的命名,因此很难猜测……但是如果有人想猜测,他们可以 - 我不希望它们。
我该如何阻止他们这样做?有没有办法显示一个自定义网页,如果他们确实尝试过,那就是“ Oi,不要偷!”还是类似?
我有一个Windows专用服务器,并通过远程桌面访问管理员。唯一应该输入该文件夹的是脚本,别无其他。
非常感谢
I have an online photo archive. My webpage is password protected but I have not yet protected the photo folder to stop people direct linking the photos by URL. All the photos are uniquely named so it is a little hard to guess... but if somebody wanted to guess, they can - and I don't want them to.
How can I stop them from doing this? Is there a way to show a custom webpage if they do try this, that's says "Oi, don't steal!" or similar?
I have a windows dedicated server with administrator access via remote desktop. The only thing that should enter that folder is a script, nothing else.
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的意思是说您已对包含图像的文件夹启用基本身份验证?如果是这种情况,任何用户都不应该能够猜测或在不先输入用户名和密码的情况下浏览目录内容,否则他们将收到 401 未经授权的错误。
Do you mean to say you have enabled basic authentication on the folder containing the images? If that is the case no user should be able to guess, or browse the directory contents without putting in username and password first, otherwise they will get a 401 unauthorized error.
您可以检查推荐人。它很容易被击败,但大多数人可能不会足够关心。这是有关 http://davidwalsh.name/prevent-image-hotlink
密码保护网站的一部分您也可以使用.htaccess文件 - http://weavervsworld.com/ docs/other/passprotect.html
我不知道如何在IIS中做任何一个,很抱歉。
You can check the referrer. It can be easily defeated but most people likely wont care enough to do so. Here is some more detail about that http://davidwalsh.name/prevent-image-hotlinking
For password protecting a portion of your website you can also use .htaccess files - http://weavervsworld.com/docs/other/passprotect.html
I dont know how to do either of these in IIS, apologies.