I'm got a site with classic asp using vbscript. How can I check if a user is coming from a certain directory on my site? I've got this code
<%Response.Write(Request.ServerVariables("http_referer"))%>
which writes: http://ift.tt/1VDXVHq. I'd like to write an if/else statement that first checks if the referring uri is in the directory http://ift.tt/110aiFa.
So my code should be something like the below. But I'm not sure about syntax. Is there such a thing as a wildcard character is asp?
<% Request.ServerVariables("http_referer") == "http://ift.tt/1VDXVHs"
Eventually I'd like to use that to write an if /else statement
<% if Request.ServerVariables("http_referer") != "http://ift.tt/1VDXVHs" then
null; elseif (screen.width <= 699) {
document.location = "/mobile/mobile_home.asp";
} %>
Aucun commentaire:
Enregistrer un commentaire