Print Page | Close Window

Allowing Access via IP Address?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=5847
Printed Date: 30 March 2026 at 11:40pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Allowing Access via IP Address?
Posted By: neilmerton
Subject: Allowing Access via IP Address?
Date Posted: 19 September 2003 at 10:07am

hi people,

just a quick question:

does anyone know how to allow people access to a webpage by checking their IP address and if it's within a certain range then they are granted permission to view the page. very similar to an intranet application i guess.

regards and t.i.a.,

Neil




Replies:
Posted By: dpyers
Date Posted: 19 September 2003 at 11:11pm

<%
    If Request.ServerVariables("Remote_Addr") = "xxx.xxx.xxx.xxx" then
     Response.Redirect "goodpage.htm"
    else
     response.redirect "Idontlikeyou_GoAway.htm"
    end if
   
%>



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: neilmerton
Date Posted: 20 September 2003 at 2:46am

thanks, i will give it a try.

regards,

Neil




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net