473,587 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Only Allow Microsoft IE Browser To View Site - All Other Browsers Are Redirected

I'm looking for a script that will check a visitors browser.

Now, I only want visitors using Microsoft InterNet Explorer to visit
existing URL and all other browsers will be redirected to another part
of my site.

I've checked a bunch of scripts but you have to identify every darn
browser available. All I want to do is check for any version of
Microsoft InterNet Explorer and redirect all other browsers to another
URL.

Any help would be greatly appreciated.

Thanks!
Jul 23 '05 #1
8 2584
Ivo
"Informatio n" <vp****@yahoo.c om> wrote
I'm looking for a script that will check a visitors browser.

Now, I only want visitors using Microsoft InterNet Explorer to visit
existing URL and all other browsers will be redirected to another part
of my site.

I've checked a bunch of scripts but you have to identify every darn
browser available. All I want to do is check for any version of
Microsoft InterNet Explorer and redirect all other browsers to another
URL.


Not true. Think the other way around, and redirect all IE browsers to a
dedicated page with a conditional comment, which is something that only IE
understands and is incidentally more politically correct:

<!--[if IE]>
<meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
<![endif]-->

All other browsers will treat this whole block as a HTML comment and ignore
it.
It goes without saying that it is always best to stay away from browser
sniffing scripts in general and those that read the user agent string in
particular as they are not reliable enough, and on the www one should really
not design for a specific browser to begin with.

HTH
--
Ivo
http://www.vansandick.com/
Jul 23 '05 #2
Ivo wrote:

[snip]

<!--[if IE]>
<meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
<![endif]-->

All other browsers will treat this whole block as a HTML comment and ignore
it.


Not applicable to IE Mac....
Mick
Jul 23 '05 #3
"Ivo" <no@thank.you > wrote in message news:<41******* *************** *@news.wanadoo. nl>...
SNIP

<!--[if IE]>
<meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
<![endif]-->

All other browsers will treat this whole block as a HTML comment and ignore
it.

SNIP

Works like a champ! Thanks for your help.
Jul 23 '05 #4
Information wrote:
"Ivo" <no@thank.you > wrote in message news:<41******* *************** *@news.wanadoo. nl>...
SNIP
<!--[if IE]>
<meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
<![endif]-->

All other browsers will treat this whole block as a HTML comment and ignore
it.


SNIP

Works like a champ! Thanks for your help.


I presume that if the user has disabled "refresh" then it won't. And
given the annoyance caused by pages that refresh themselves, the number
of users with it disabled will grow.

You have no way of detecting it unless they take the time to e-mail you
and complain.

--
Rob
Jul 23 '05 #5
RobG <rg***@iinet.ne t.auau> wrote in message news:<3H******* **********@news .optus.net.au>. ..
Information wrote:
"Ivo" <no@thank.you > wrote in message news:<41******* *************** *@news.wanadoo. nl>...
SNIP
<!--[if IE]>
<meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
<![endif]-->

All other browsers will treat this whole block as a HTML comment and ignore
it.


SNIP

Works like a champ! Thanks for your help.


I presume that if the user has disabled "refresh" then it won't. And
given the annoyance caused by pages that refresh themselves, the number
of users with it disabled will grow.

You have no way of detecting it unless they take the time to e-mail you
and complain.


Well, we can only do our best to make our visitors comfortable. It is
very very unfortunate that different browsers handle html and java
differently.

Thanks!
Jul 23 '05 #6
On 30 Nov 2004 03:24:24 -0800, Information wrote:
Well, we can only do our best to make our visitors comfortable.
Admirable.
..It is
very very unfortunate that different browsers handle html and java
differently.


Yes it is, but that is the way it is. However, they generally
render valid mark-up in a logical way, certainly not the same
as each other, but well enough for the visitor to access and use
the content.

OTOH, you can use CSS import hacks to ensure that the *formatting*
is the same on a multitude of browsers. It's advantages are that
it works even if..
1) Client side script is disabled.
2) META-REFRESH redirect is disabled.

Further, it requires no 'second page', and works according to the
browser's parsing engine, rather than the browser type it claims to be.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #7
Ivo wrote:
"Informatio n" <vp****@yahoo.c om> wrote
Now, I only want visitors using Microsoft InterNet Explorer to visit
existing URL and all other browsers will be redirected to another part
of my site.
Got to say that I can't think why you would want to do that at all. It
makes things harder to maintain and seems to serve no useful purpose.
I'm sure you must have your reasons and admit that I'm curious - but its
none of my business.
Not true. Think the other way around, and redirect all IE browsers [snip]

<!--[if IE]>
<meta http-equiv="refresh" content="0;url= http://www.mysite.com/ieonly.htm">
<![endif]-->

Splendid tip - for the unimaginable case that you might need it.
Jul 23 '05 #8
Mark Preston <us****@nosourc e.co.uk> wrote in message news:<co******* ************@ne ws.demon.co.uk> ...
Ivo wrote:
"Informatio n" <vp****@yahoo.c om> wrote
Now, I only want visitors using Microsoft InterNet Explorer to visit
existing URL and all other browsers will be redirected to another part
of my site.

Got to say that I can't think why you would want to do that at all. It
makes things harder to maintain and seems to serve no useful purpose.
I'm sure you must have your reasons and admit that I'm curious - but its
none of my business.

SNIP

Well, my son's website developer moved away and my son asked me to
pick up his site for now (my son owns a Comic Book store). The site
is stock full of java with all kind of neat stuff taking place on all
the pages. I was "fat and happy" with the updates and decided to take
a look at the site using NetScape 7x, Opera, Mozilla FireFox, Mozilla
Navigator, and NetScape 4x. Geeeez, everything looked perfect with IE
but was a total mess with most of the other browsers. I started to
play with the files and came close with all my test browsers but not
close enough for me! I decided that I would rather limit the viewing
for now (with an explanation to visitors using other browsers) while
redesigning the site so it is compatible with all browsers.

Hope I wasn't long winded on my explanation.
Jul 23 '05 #9

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

Similar topics

163
14591
by: Shiperton Henethe | last post by:
Hi Know any good utilities to help me strip out the tags that Microsoft Excel 2002 leaved behind when you try and export an HTML format file? This is driving me NUTS. And really makes me hate microsoft with a passion. I literally just want "compact HTML" - ie just the data,
21
2758
by: fleemo17 | last post by:
I'm diving into the world of CSS and am blown away by the power of it. I'm redesigning a website, trying to eliminate the tables in the layout in favor of CSS. However I've come across a stumbling block evident only on the PC using IE and Netscape. (A mighty big stumbling block.) The problem is that a gap appears between an image I have on...
10
4309
by: bbcrock | last post by:
does anyone have sample code to display a pop up when a user leaves the site? I really don't want to use this technique, but the clients demand it. I'm thinking something like un body onunload, catch the URL they're linking to and parse it for our own site's url and only display the pop up if they're different. anyone have a sample of...
7
21287
by: Privacy Advocate | last post by:
//crossposted to: comp.lang.javascript, alt.comp.lang.javascript in an effort to get factual answers from JavaScript experts// Simply put; Is it possible to obtain the real (actual) IP address of someone (client) that visits a web site through an anonymous proxy if this person ONLY has JavaScript enabled in their browser? This is NOT a...
8
5460
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I...
1
1163
by: Kruno | last post by:
Hi ! My problem is : I have a link on my secure part of web site with which user can signout... Along with that below link is users name under which user signs in.. When user presses that link he is redirected to default starting page and on the way I call the Session.RemoveAll, FormsAuthentication.Signout... But If I press BACK button...
7
2910
by: jsale | last post by:
I'm currently using ASP.NET with VS2003 and SQL Server 2003. The ASP.NET app i have made is running on IIS v6 and consists of a number of pages that allow the user to read information from the database into classes, which are used throughout the application. I have made class collections which, upon reading from the DB, create an instance of...
0
1415
by: Jeff | last post by:
Hey asp.net 2.0 I want my website to be available only for authenticated users (except the front page (Default.aspx) which all users can view). If an anonymous user tryes to access other pages than the default.aspx, then the user should be redirected to AccessDenied.aspx.. There is the problem. I tested as a unauthenitcated user and...
16
2491
by: Ben Sehara | last post by:
Is there any way I can limit the access to my website? I have a site "A" and I want to allow access to it only from site "B" login user. If someone try to access site "A" directory, I want it redirected to site "B" for login. After login at site "B", you see the link to site"A". When you click it, you see login page for site "A". Is it...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.