View Full Version : open web page depending on user's internet access
05-02-2006, 06:55 PM
Hi. Some of the users on our network do not have internet access. Is there a way to have one web page open for those users with internet access and another web page open for those without internet access?
05-02-2006, 07:00 PM
And how exactly do you expect that page to be opened for the ones without internet access? How will they recieve updates. Can you communicate with their computers through the network?
05-02-2006, 07:03 PM
Yup, all you have to do is use something to check the ip (php is the most reliable way), and then either write the page depending on weither the ip is internal or not, or redirect them to the specific version.
05-02-2006, 07:09 PM
The site is accessible internally for all. I want to add some information to the site (for example, daily weather, news, etc.) that is only accessible to users that have access to the Internet however I know that for users without Internet access, this can be irritating. Therefore, I want to create 2 separate home pages; one home page with the bells and whistles for the lucky with external access and one for the internal folk who need to get the news and weather from their neighbour. I want the appropriate page to be available to them when they open their browser without prompting the user to pick which site they want to access (no point picking the one with internet access when you don't have it).
05-02-2006, 07:17 PM
Okay is the intranet mainly based on using Internet Explorer? You can try something like this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
window.location = "internetbasedsite.html";
window.location = "noninternetbasedsite.html";
var i = new Image();
i.onload = doConnect
i.onerror = doNoConnect;
i.src = 'http://www.internet.com/someimage.gif?d=' + escape(Date());
If the image loads successfully then it will redirect the user to the internet based page. If the image fails to load then it will direct the user to the noninternet page. Since browsers cache images I've added on the date to the image so the browser things its a new image.
05-02-2006, 07:25 PM
Yes. It is a managed environment. Everyone has the same software but some users have different access rights (ie. internet access - externally). Everyone has IE for a browser (which is the standard).
05-02-2006, 07:29 PM
I edited my post, if you are able to set the same homepage for everyone then the above should do what you want. Just use your own image that is somewhere online.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.