问题描述
我拥有一个包含大量免费软件的网站。我面临的问题是,来自世界各地的人们正在直接链接
的文件(例如.zip文件)并将它们发布到他们的网站和一般论坛中。我获得了大量的带宽,没关系,但访问的页面数量很少。有没有可以添加到链接的方式或脚本,以便当有人按下来自外国网站的链接时,我的网站上的一个页面会打开,然后让他下载该文件,以便获得更多访问。
例如,这是我网站的地址:
当任何人按下它时,它将直接开始下载过程。
I own a website which contain a lot of freeware stuff to download on it. The problem I'm facing is that people from around the world are taking the direct linksof the files (for example .zip files) and posting them on their websites and general forums. I am getting a huge amount of bandwidth and that's ok, but the number of pages visited is low. Is there a way or a script that I can add to the links, so that when someone presses on the link from a foreign website, a page from my website opens instead, which then lets him download the file so I can get more visits.
For example, this is a address from my website:
When anyone presses on it, it will start the downloading process directly.
If you are using PHP, you can have a script that links the user to the download but only if the $_SERVER['HTTP_REFERER']
is from your site. If it is not you redirect to your site.
这篇关于如何防止深层链接到我的网站上的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!