javascript to redirect user based on IP address

Status
Not open for further replies.

ak6ar

Seniorius Lurkius
34
I ran accross this article in comp.lang.javascript

Retrieving IP addresses with JavaScript

What he suggests you use is the following code.

<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script LANGUAGE="JavaScript" src="http://jwscripts.com/js/ip.php">
</SCRIPT>
</HEAD>
<BODY>
<script LANGUAGE="JavaScript">
document.write("Your IP-Address = " + ip);
</SCRIPT>
</BODY>
</HTML>

You should be able to use ip to redirect based on what is in there. Hope this helps :) .
 

sookaa

Ars Tribunus Militum
2,103
so....i have come to conclude so far that it does not look possible using javascript as well....am really only looking for a way to redirect internal users (which would be the proxy server IP address) to a page with some non important info and was hoping to be able to do it without having to do it through authentication of some sort...looks like ASP is the way to go on this....blah

sookaa
 
Status
Not open for further replies.