473,324 Members | 2,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Website redirect with JS?

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?
THANKS!!!
Jul 23 '05 #1
1 2008
"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.
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mr B | last post by:
Howdy all, I have 2 domain names that both go to the same website. For example, if www.XXXX.com is the primary name for the website, if you type in www.XXXX.com or www.YYYY.com, they both go...
0
by: ohaya | last post by:
Hi, I've been researching this, and I'm not sure if what I'm trying to do is possible, but I thought that I'd ask: I have two webservers/websites. The first webserver/website is running...
1
by: A.M | last post by:
Hi, I am trying to use Response.Redirect to redirect the response to another website (say http://www.yahoo.com) but asp.net redirects the request to http://localhost/www.yahoo.com Which is...
8
by: Stimp | last post by:
I need to take my website offline for an hour or so while I perform some maintenance... is it possible to create a 'catch-all' redirect to a temporary page (i.e. something in Web.config or...
5
by: Tyler | last post by:
I am developing an application which will allow me to automatically sign into an external website. I can currently do a screen scrape using HTTPWEBREQUEST. However I want to just redirect to the...
3
by: glezaber | last post by:
Hi, I´ve two websites stored in IIS 5.0, and what I want is to Redirect from A website to B website, the problem is that doesn´t work because if I use Response.Redirect (http://localhost:5080)...
3
by: vikramp | last post by:
Hi, I want to know how to setup the "Under Maintenance" page for the website? Here is the thing: I have application setting in web.config called "MMode". I set it to "Y" when I need to do...
1
by: jaimebienlesfruits | last post by:
Hi, I'm moving my old website to my new domain name and I need help redirecting. The thing is this, my old website (with a very long long long URL) was given a domain name by my host, but the...
2
by: hmchkus | last post by:
Hi, How can I integrate part of information from another website on my page? For example, a table of schedule, weather, stock info... I would like to know both way: 1. redirect the client...
5
by: rockdale | last post by:
Hi, all: I have a website with its own login page. Now one of my clients want their employees log into my website from their website. They want to have their login page (look and feel are...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.