Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Me neither… but it's their servers so I'll just have to do it their way I suppose.

Cheers.
 
It is possible to define LOCAL hostnames that only resolve on that computer. Developers use this to create fake domain names for sandboxes (development platform). This isn't common because it's just as easy to access a local web site sandbox using 127.0.0.1 or localhost as the hostname, duh. But if you wanted to setup say port 82 on your web server with a virtual host pointing to myfakedomain.com mapped to 127.0.0.2 and be able to locally browse to it via http://myfakedomain.com:82 for example - you could. Not though you would go through all that trouble...

-jim
 
I was directed to read the following instructions, but they're for a Windows machine it seems:

http://www.000webhost.com/forum/faq/7613-howto-view-your-site-before-dns-update.html

Anyone have any clue how to perform the same technique under OS X?

You just put the references in /etc/hosts
Here is my /etc/hosts I use for local network and to block adds by referring some advertisers to my routers web page instead 127.0.0.1 to prevent error messages about no server.

Code:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost 
fe80::1%lo0	localhost
192.168.0.100	c5.zedo.com
192.168.0.100	mac
192.168.0.101	winvista
192.168.0.102	linux
192.168.0.1	d-link
192.168.100.1	cable-modem
192.168.100.1 	a248.e.akamai.net
192.168.100.1	cdn.optmd.com
 
What's the easiest way to edit the file?

I can open it into text edit but I can't save because of the permissions on it.

Is there a way to temporarily override the permissions to edit a file? Or would you edit it via Terminal? Or is the simplest way of doing it to change all folder permissions?

The web host is changing the FAQ to include Mac and Linux users so I'm trying to figure out the simplest instructions. Cheers.
 
What's the easiest way to edit the file?

A couple options

1.) Edit through Terminal
Code:
sudo pico /etc/hosts
Hit ctrl+x to exit after done editing, then hit y to save on exit.

2.) Edit in TextEdit and get it there through Terminal.
Code:
sudo open /etc/hosts

Both options will ask for your password.
 
Thanks for the tip.

Sudo open was able to open the file in textedit but still wouldn't save it from textedit. Sudo pico did work though.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.