Forum Moderators: open

Message Too Old, No Replies

how to prevent users from accessing my download directly

         

lindajames

12:28 pm on Aug 8, 2004 (gmt 0)

10+ Year Member



i need simple script that will check if the reffer is my domain and if so it would do a response.redirect to the download and if not then it would do a response.write with an error, can someone tell me how i can do this in ASP?

JuniorHarris

12:50 pm on Aug 8, 2004 (gmt 0)

10+ Year Member



if request.servervariables("http_refer") = "http://www.domain.com/myrefer.html" then
response.redirect ("http://www.domain.com/mydownload.html")
else
response.write "Buffoon you can't get there from here"
response.end
end if

Krapulator

6:21 am on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



or this one which would let you refer from any page on your site:

if instr(request.ServerVariables("HTTP_REFERER"), "www.yourdomain.com") then
response.redirect ("http://www.yourdomain.com/mydownload.html")
else
response.write "Buffoon you can't get there from here"
response.end
end if