Solved

hosts file redirection...

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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