Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect based on clients IP address

Status
Not open for further replies.

JCDugas

MIS
Dec 26, 2001
270
US
How do I direct a web site based on the clients IP address?

I want to be able to send Internal clients one way and external clients another.

Thanks.
 
you need a table of all the internal addresses and run a compare against th Db to see if the user is in the list
then redirect based on the result.

hth
Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
To retrieve the visitors ip address, you would use
Code:
Request.ServerVariables("REMOTE_ADDR")
].

When redirecting, you have to check wether this address is within your local boundaries or not. (Which means you have to find out which ip-range your internal net has.)

Hope this helps,
Palooka
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top