Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-09-2012, 08:27 PM   PM User | #1
swhetsel
New to the CF scene

 
Join Date: Jun 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
swhetsel is an unknown quantity at this point
Script for IP based redirect

Can anyone help me out with a script that can redirect based on IP address?

I want all of my computers on my LAN, 192.168.1.1-255 to be redirected to a specific page.

IE When I type in test.homeip.com it goes to my web server and reads the index.html file. If the IP is in the 192.168.1.0 range it will redirect to 192.168.1.10:80 and if its any other IP it will send it to 192.168.1.11:80

Thanks!

Last edited by swhetsel; 04-09-2012 at 08:30 PM..
swhetsel is offline   Reply With Quote
Old 04-09-2012, 10:11 PM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,530
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
You can't do it with Javascript - JavaScript can only obtain an IP address when either a server side script or Java supplies it.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:46 PM.


Advertisement
Log in to turn off these ads.