Prevent Linking or Leeching of files

Results 1 to 3 of 3

Thread: Prevent Linking or Leeching of files

  1. #1
    Join Date
    Dec 1969

    Default Prevent Linking or Leeching of files

    How can you prevent another site from linking to your content or leeching files from your site?<BR>Is this possible to prevent using ASP?

  2. #2
    Troy Ackerman Guest

    Default RE: Prevent Linking or Leeching of files

    Peter:<BR><BR>You can accomplish this through the Request.ServerVariable collection. You can do this for .ASP pages for sure, but I&#039;m not sure about other file types (.jpg/.htm/etc.)<BR><BR>GET RID OF OFF-SITE LINKERS<BR>----------------------------<BR>Dim strRequestSource<BR>strRequestSource = Request.ServerVariables("HTTP_REFERER")<BR>If InStr(strRequestSource,"") = 0 AND InStr(strRequestSource,"your.sites.IP.address") Then<BR>Response.Redirect strRequestSource<BR>End If<BR><BR>untested but you get the idea. that will redirect them to where they came from or you could design a custom page.<BR><BR>Cheers,<BR>Troy<BR><BR><BR>

  3. #3
    Reggie Guest

    Default RE: Prevent Linking or Leeching of files

    -media.htm-this is where you have the files for people to download<BR>&#060;a href="download.asp?myfile=video.mpg"&#062;click here&#060;/a&#062;<BR><BR>-download.asp-process the request and forward them to the right spot if they came from your site or to your homepage if they came from somewhere else.<BR>&#060;%<BR>if Request.ServerVariables("HTTP_REFERER")="" then<BR>Response.redirect "/random_directory_to_help_hide_files/video.mpg"<BR>else<BR>Response.redirect ""<BR>%&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts