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
Solved

hosts file redirection...

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
networked printer 4 80
2 windows xp desktops computer 8 154
Need to Copy files and folders in a batch file 2 87
How to Force Windows XP to Scan for driver update 14 126
Disclosure: Use this tutorial only when no other options helps to get Windows XP running without any problems and you don't want to format the drive. The back up of the data is the responsible of the user, however there is a description of how t…
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
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…

856 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