Solved

hosts file redirection...

Posted on 2004-04-24
3
1,236 Views
Last Modified: 2011-09-20
I have read a little about using the hosts file to block websites, and have used this method as well. But I would like to know if it is possible to have the hosts file point to a file on the local hard drive if the user visits a web site that has been entered into the host file. This way you could give a customized messaged instead of the server not found page. In some cases the user could keep trying different addresses, and different methods to get to the site maybe even finding one you haven't blocked if they didn't know it was blocked and for a good reason.

 ie. 127.0.0.1\ [path to folder] \blocked.htm     www.gator.com

 Thanks for your time and "greater than mine" knowledge,
RBennett  
0
Comment
Question by:Ryan Bennett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
Pete Long earned 250 total points
ID: 10909293
if your 2k or XP and you have IIS installed this will happen anyway :) just point iis to a web page you have prepared and just typing http://127.0.0.2 will direct to it, so will your host file, WITHOUT DOING ANYTHNG to it :)

Install IIS on XP

Installing IIS
You can install IIS, add optional components, or remove optional components for IIS by using the Add/Remove Programs dialog box in Control Panel. IIS requires that you install certain software on the computer prior to installation. Review the IIS Software Checklist below before installing IIS.

IIS Software Checklist
Before you install IIS, you need to install the Windows TCP/IP Protocol and Connectivity Utilities.

The following optional components are recommended:

The Domain Name System (DNS) service installed on a computer in your intranet. If your intranet is small, you can use Hosts or Lmhosts files on all computers in your network. This step is optional, but it allows users to use friendly text names instead of IP addresses. On the Internet, Web sites typically use DNS. If you register a domain name for your site, users can type your site's domain name in a browser to contact your site.
For security purposes, Microsoft recommends that you format all IIS drives with NTFS.
Microsoft FrontPage to create and edit HTML pages for your Web site. FrontPage is a WYSIWYG editor that provides a friendly, graphical interface for tasks such as inserting tables, graphics, and scripts.
Microsoft Visual InterDev to create and develop interactive Web applications.
For more information on Windows TCP/IP Protocol and Connectivity Utilities, DNS, or NTFS security, see your Windows XP Professional online documentation.

IIS Installation
During installation, IIS installs optional components like Common Files, Documentation, and the Internet Information Services snap-in. You can choose not to install the optional components; however, deselecting specific components can decrease IIS functionality or disable IIS services. If you are unfamiliar with the optional components and how they affect IIS, install IIS with the default settings. After you install IIS, you can view Installing IIS Optional Components in the IIS online documentation for more information.

To install IIS, add optional components, or remove optional components

Click Start, click Control Panel, and click Add or Remove Programs.
Click Add/Remove Windows Components. The Windows Components Wizard appears.
Follow the on-screen instructions to install, remove, or add components to IIS.
Notes

If you upgrade from a Windows NT 4.0 Workstation that has IIS installed to Windows XP Professional, IIS is installed by default. If IIS was not installed on the Windows NT 4.0 Workstation, you will need to install IIS manually.
Personal Web Server is not available on Windows XP Professional. If you upgrade from a Windows home or personal product, you must install IIS for similar Web server functionality.
For more information on IIS, refer to the IIS online documentation by typing http://localhost/iisHelp/ in your browser address bar, and pressing ENTER.
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/winxppro/proddocs/iiiisin2.asp

*****Further Links and Reading*****

Installing IIS on Windows XP Pro
http://www.webwizguide.com/asp/tutorials/installing_iis_winXP_pro.asp

Install IIS on Windows XP Professional
http://www.fordwebs.com/tutorials/mx-asp/install.asp

*****Troubleshooting*****

IIS FAQ
http://www.iisfaq.com/

IIS Answers
http://www.iisanswers.com/
0
 

Author Comment

by:Ryan Bennett
ID: 10912720
You're awesome!! Everything that I wanted and needed to know!

 Thanks,
RBennett.
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 10912839
ooooo we do like a happy customer :)

ThanQ
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

717 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