Skip to main content

mac osx - Can I specify a port in an entry in my /etc/hosts on OS X?













I
want to trick my browser into going to localhost:3000 instead of xyz.com. I went into
/etc/hosts on OS X 10.5 and added the following
entry:



127.0.0.1:3000
xyz.com


That does not
work but without specifying the port the trick works. Is there a way to do this
specifying the port?


itemprop="text">
class="normal">Answer





No, the hosts file is simply a way to statically resolve names when no DNS
server is present.


Comments