"Posting2002" wrote:
Hi, I am trying to keep a specific subdomain from seeing my
webpage, something like
192.168.X.X
Would it be possible to have a start-up JavaScript which
checks the IP and then if it falls in those ranges to redirect
them to Yahoo for example, and if it doesn't then to load the
website normally?
There is no cross browser client-side method of reading an IP address.
Javascript is neither reliable enough, nor secure enough to "prevent"
anything anyway (anything attempted with javascript can be subverted or
by-passes by anyone who knows what they are doing. And javascript can be
disabled, and in some cases very selectively (so it only applies to the
page with your re-direct script, for example).
Blocking and re-directing base on IP addresses is something that can
only reasonably be handled on the server.
Richard.