Is it possible to modify a file on my PC to map a domain name to a certain IP address?
I thought I'd read about it in the past, as a solution to domain-name updates that hadn't yet rippled out to an individual's area.
I realize that this would only effect me, but that's exactly what I'm looking for. I want to be able to work with my local test-sites whenever my internet connection goes down.
I'm running an apache server here on my main machine, and the separate sites are configured as virtual hosts, so whenever the net goes down I have no way of accessing them.
Local Domain-Name to IP mapping?
- Sergeant Thorne
- DBB Material Defender
- Posts: 4641
- Joined: Sun Nov 25, 2001 3:01 am
- Location: Indiana, U.S.A.
- CDN_Merlin
- DBB_Master
- Posts: 9781
- Joined: Thu Nov 05, 1998 12:01 pm
- Location: Capital Of Canada
Re: Local Domain-Name to IP mapping?
Check out the file %SystemRoot%\\System32\\Drivers\\etc\\hosts .
- Krom
- DBB Database Master
- Posts: 16137
- Joined: Sun Nov 29, 1998 3:01 am
- Location: Camping the energy center. BTW, did you know you can have up to 100 characters in this location box?
- Contact:
Code: Select all
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
#192.168.1.200 krom.d3k.org
Re:
Be careful, you might get sued.Krom wrote:Code: Select all
# Copyright (c) 1993-1999 Microsoft Corp.
- Sergeant Thorne
- DBB Material Defender
- Posts: 4641
- Joined: Sun Nov 25, 2001 3:01 am
- Location: Indiana, U.S.A.