Forum Moderators: DixonJones

Message Too Old, No Replies

Redirect Users

Using IP adresses to redirect users

         

Varied Anteater

7:13 pm on Apr 4, 2003 (gmt 0)

10+ Year Member



Hi,

Apologies if this is on the wrong board or has been asked before - I am new, and a relative beginner compared to everyone here!

Well - this is how it goes. I run a site for my school (www.igslibrary.org). I also have an intranet version of the site, which is accessible from within the school network.

When users go to www.igslibrary.org, I want them to be re-directed onto the intranet if they are within the network.

I can get the IP range of the network off the administrator, I just need to know what the code is to make it work.

Varied Anteater

9:16 pm on Apr 10, 2003 (gmt 0)

10+ Year Member



Anyone?

DZero

1:42 am on Apr 11, 2003 (gmt 0)

10+ Year Member



Two ideas come to mind...

One is to set up hosts files on all the workstations, so that the domain resolves to the intranet IP.. Depending on how many workstations there are nd if the sysadmin will help you, this may not be an option...

The other, is to set up a page before the site, or, as code that runs before the page loads, that checks the IP with the list you have and redirect them if they're local or do nothing if they're not..

Hope this helps you out!

Varied Anteater

3:21 pm on Apr 11, 2003 (gmt 0)

10+ Year Member



Second option sounds good, although 1st shouldn't be a problem either. Which is easiest?

The admin is actually a really nice guy - although I'm a student he doesn't look down on me, so that's good.

Let me know how to do them