Request.servervariables ("http_referr") working method
The following situations are obtained from the address bar of the browser normally request.servervariables ("http_referr"):
1. Directly use <A href>
2. Form submitted with Submit or <input Type = Image>
3. Form (POST or GET) submitted by JScript
Request.servervariables ("http_referr") The situation that cannot be taken normally:
1. Link from the collection clip
2. Click "Homepage" or custom address
3. Use JScript's local Location.href or Location.Replace ()
4. Enter the address directly in the browser
5. <%Response.redirect%>
6. <%Response.addheader%> or <meta http-equiv = Refresh>
7. Load the address with XML
Obviously, Request.servervariables ("" http_referr ") cannot work properly in most cases. For this reason, we can make Request.servervariables (" http_referr ").
As an example:
The following is the code fragment: 'Download system URL list, do not bring http: // domain = "vevb.com, 61.156.14.223 ″ splowomain = split (domain, ",", ") strreferr = request.servervariables ("http_referr") For III = 0 to uborder (splDomain) If Instr (Strreferr, TRIM (SPLDOMAIN (III)) > 0 Then Ishttp = True next if isnull (strrefer) or ishttp = false then Response.write "The download link comes from the illegal theft chain, <a href =" http://www.vevb.com/ "> Please enter the martial arts webpage before downloading. </a>" Closedatabase response.end end if |