Solved

User Agents

Posted on 2000-03-23
4
177 Views
Last Modified: 2010-04-09
User Agent
 
Is it possible to disallow some user agents on a web site ??, lets say I don't want
Teleport Pro/1.29
to have access to my web, is that an option somehow ??

If people want to use my site, then they can go to it !! Whay copy the hole site to there own computer ??, it's 20Mb of data, it "overhead" the webserver!
0
Comment
Question by:win32
  • 2
4 Comments
 
LVL 19

Expert Comment

by:daveamour
ID: 2652093
Yes you can do this

Its more of an ASP question though or other server side scripting technology

Do you have ASP facilities on your site?
0
 

Author Comment

by:win32
ID: 2653013
Nope, Ok I see then it can't be doen !
0
 
LVL 3

Expert Comment

by:fibdev
ID: 2656703
I've seen this done with javascript, but I don't know how to do it.  I take it you are trying to protect your site from crawler apps?
0
 
LVL 19

Accepted Solution

by:
daveamour earned 10 total points
ID: 2656872
I can do it in JavaScript

<html>

<head>
<title>New Page 1</title>
</head>

<body>
<Script Language="JavaScript">
<!--
  if (navigator.userAgent == "Teleport Pro/1.29")
  {
    window.location.href = "http://www.microsoft.com";
  }
-->
</Script>
</body>

</html>

However this is not very robust as someone could simply disable Javascript if they wanted to visit your site.  This is the way to do it though if you do want to use Javascript.

Of course you can redirect the window to any page you like - I just used Microsoft as an example.

Alternatively you could have a default page which redirected to the main page other than those user Agents you wanted to keep out.

Again this is full of holes but maybe it will help

Cheers

Dave

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now