access via another server

Results 1 to 3 of 3

Thread: access via another server

  1. #1
    Join Date
    Dec 1969

    Default access via another server

    Is there a way that I can determine the http address that someone has come from. ie only come from a certain server. I can not use the ip address as this can change. I want only to allow someone who has been to a certain site to access the pages on my server. I can only use straight HTML link on the server that the user will be coming from. So is there some way of determining if they have come from a certain site using ASP on my server???<BR><BR>Cheers<BR><BR>Chuck

  2. #2
    Join Date
    Dec 1969

    Default RE: access via another server

    &#060;%<BR>WhereFrom=request.ServerVariables("HTTP _Referer")<BR><BR>if (WhereFrom="") then<BR>Response.Write("Welcome to....")<BR><BR>else<BR>Response.Write("You are not authorized to view this page please go to")<BR><BR>end if<BR>&#037;&#062;<BR><BR>Hope this helps... Cheers!

  3. #3
    AtiveALLI Guest

    Default RE: access via another server

    A Better way of clearing this issue from an Authoration point of view would to use the request.ServerVariables("HTTP_HOST")<BR>Witch returns the IP adress of the Visitor and if you only want PPL on your domain to View the site you could use the first 2 numbers of your own IP adress .. for example my IP<BR>and then 193.4 represnts my domain so if i do<BR><BR>&#060;% <BR>WhereFrom=Request.ServerVariables("HTTP_HOST") <BR> if Left(WhereFrom,5) = "193.4" Then<BR> Response.Write("Welcome to....")<BR> Else <BR> Response.Write("You are not authorized to view this page!")<BR> End if <BR>&#037;&#062;<BR><BR>the Left(WhereFrom,5) Returns the five first Characters in WhereFrom...<BR><BR>If i understand you right this is what you are looking for<BR>hope this helps<BR><BR>ActiveALLI<BR>Software Integrator<BR>OZ.COM<BR><BR><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