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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirecting to page based on user's ip address

Status
Not open for further replies.

craigosa6033

Technical User
Sep 12, 2005
10
US
I've been asked to create a redirect based on a client's ip address. Currently, the user goes to:
which is a shortcut that I have created for them. This is the user which goes to group 7.
I have over 20 groups.

My question is: if the user goes to:
Can I have them re-directed to
Depending on the originating ip address?

Thanks,

Carlos
 
Each group has about 40 users.

Each group has it's own originating address.
For example group 32 is
10.232.1.10

Group 20:
10.220.1.10

and so on...
 
This would be easy to do with PHP or other server-side languages and possibly it could be done with Javascript(ask in that forum).

In PHP you would put the IP's into an array where the IP was the key and the corresponding group was the data. By searching the array for a match with the IP you could re-structure the re-direct.

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top