How to prevent deep linking to files on my website

后端 未结 5 931
名媛妹妹
名媛妹妹 2020-12-17 20:34

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 links of the fil

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-17 20:53

    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.

提交回复
热议问题