Results 1 to 2 of 2

Thread: Filtering

  1. #1
    Andy Barker Guest

    Default Filtering

    How can i write a filter that channels users into different areas of my site depending on the domain they enter from.<BR><BR>I tried using Request.ServerVariables("REMOTE_HOST")<BR><BR>but that only returned the IP<BR><BR>&#060;%UserCheck = Request.ServerVariables("REMOTE_HOST")<BR><BR>DomF ilter = right(UserCheck, 6)<BR>if DomFilter = "" then<BR> response.redirect "ukpage.asp"<BR>elseif DomFilter = "" then<BR> response.redirect "ukpage.asp"<BR>elseif DomFilter = "" then<BR> response.redirect "ukpage.asp"<BR>else<BR> response.redirect "worldpage.asp"<BR>end if%&#062;<BR>

  2. #2
    fl1rt Guest

    Default RE: Filtering

    I&#039m writing this blind, as I&#039m in the middle of somthing quite complicated! ...<BR><BR>I believe the URL server variable should do the trick, but here&#039s the others that are useful just in case.<BR><BR>Request.ServerVariables("HTTP_HOST")< BR>Request.ServerVariables("URL")<BR>Request.Serve rVariables("QUERY_STRING")<BR><BR>you will probably need to resolve the request header and strip the string down into it&#039s various DNS componants..<BR><BR>basically:-<BR><BR><BR><BR>becomes:<BR><BR>simply look for the "/" and chop the right portion of the string off.<BR><BR>kiss goodbye to "/index.html"<BR><BR>and then count back a maximum of 2 "."s to resolve their domain.<BR><BR>kiss goodbye to "www.somedomain.demon."<BR><BR>if you&#039re really stuck, mail me:<BR>

Posting Permissions

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