Restricting page access using Request.ServerVariab

Results 1 to 2 of 2

Thread: Restricting page access using Request.ServerVariab

  1. #1
    Join Date
    Dec 1969

    Default Restricting page access using Request.ServerVariab

    How to use it in order to restrict access to allow only ip that begin by 132.203 or 24.200 by example??<BR><BR>Is there any operators for "begin with" ?<BR><BR>I tried it for restricted to acces the page but when I add another restricted series of ip, i get lost in if, then, else, end if!!!<BR><BR>&#060;% ip=Request.ServerVariables("REMOTE_ADDR" )<BR>if ip &#062;= "24.200" then<BR> if ip &#060; "24.201" then<BR> response.redirect("")<BR> else<BR> end if<BR> else<BR>end if<BR>%&#062;<BR><BR><BR>Thanks!

  2. #2
    corin Guest

    Default RE: Restricting page access using Request.ServerVa

    truncate your IP address<BR><BR>&#060;% ip=Request.ServerVariables("REMOTE_ADDR" )<BR><BR>ip = Left(strTest, 6)<BR><BR>if ip &#060;&#062; "24.201" then<BR>response.redirect("")<BR>else<BR>do something<BR>end if<BR><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