Forum Moderators: phranque

Message Too Old, No Replies

Using official domain as localhost dir

         

asantos

6:53 pm on Aug 20, 2007 (gmt 0)

10+ Year Member



Hi.
Im currently developing a website for customer 12345abc.com

Is there any way for me to configure this setting?

1) When i type 12345abc.com it should open the contents of [localhost...]

2) When someone on my network (designer) types 12345abc.com it should open the contents of [MY-PC-NAME...]

Is it doable by somehow configuring apache? Or should i use another technique?

londrum

8:25 pm on Aug 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i think you can just change the HOSTS file on each PC. just point that URL at whatever you want.

jdMorgan

8:42 pm on Aug 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Right, use the hosts files. That's its name -- just "hosts" -- no file extension. It is a plain-text file, and is present on any internet-capable machine regardless of the operating system. Its location varies by OS and version, but you can find it by search the system areas of the hard drive.

On your own machine, point the domain name to 127.0.0.1 (localhost).
On the other team member's PCs, point the domain name to the LAN IP address of your PC.

There are usually examples in the files itself.

You will have to remove those hosts file entries if you later want the domain name to resolve to an external server.

Jim

g1smd

9:04 pm on Aug 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I host www.thatsite.com on the public server, and

I host dev.thatsite.com on my localhost server.

The HOSTS file sets up where dev.thatsite.com is served from.