Welcome to WebmasterWorld Guest from 23.20.230.24

Forum Moderators: travelin cat

Message Too Old, No Replies

View before Propagation

like we do on PCs

     
10:18 am on Sep 29, 2008 (gmt 0)

10+ Year Member



Hello all,

on the PC side of things, if I want to view a site before the domain name has propagated, especially a site that is dependent upon the domain name as a URL (as when installing scripts) we open up the HOSTS file, make a few tweaks, restart our broswer, and voila, that PC is fooling into thinking that the IP and web address go together.

Is there a similar method for a MAC? I have a client who is going to be traveling with her MAC and wants to be able to vbiew the porogress of her ECommerce site while away.

Please let me know if that is doable.

Thanks,

Pat

11:28 am on Sep 29, 2008 (gmt 0)

10+ Year Member



OS X is unixy and should also have a hosts file somewhere under /etc

[edited by: travelin_cat at 2:18 pm (utc) on Oct. 16, 2008]
[edit reason] No URL's Please. Thank you! [/edit]

9:57 am on Oct 16, 2008 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Windows copied the idea of a HOSTS file from unix.

On leopard at least the standard /etc/hosts still works like in the beginning of the Internet.

e.g.:


$ ping www.example.com
PING www.example.com (208.77.188.166): 56 data bytes
64 bytes from 208.77.188.166: icmp_seq=0 ttl=55 time=162.047 ms
...
$ sudo vi /etc/hosts

You likely will get a prompt for your password unless you recently used sudo.

now create an extra line reading


127.0.0.1 www.example.com

and

$ ping www.example.com
PING www.example.com (127.0.0.1): 56 data bytes
64 bytes from [b]127.0.0.1[/b]: icmp_seq=0 ttl=64 time=0.055 ms
...

or make sur the cache of your browser is cleared.

To undo:


$ sudo vi /etc/hosts

and delete that line you added.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month