Solved

hosts file redirection...

Posted on 2004-04-24
3
1,221 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
  • 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

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

Title # Comments Views Activity
rebuilding your XP box 15 149
XP won't boot 27 134
move Windows 10 apps to diff disk 39 139
active directory 5 53
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
A short film showing how OnPage and Connectwise integration works.

943 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

16 Experts available now in Live!

Get 1:1 Help Now