You could simply edit your hosts
file and add a host definition like so:
1.2.3.4 foo
Where 1.2.3.4
is the IP of bar.com
and foo
is the shortcut you want to call it.Save the file, open any browser and type foo
in the address bar, that should take you to http://1.2.3.4
.
This should work for all OSs, at least for Linux, Windows and OSX (or any Unix). The only thing that changes is the location of the hosts
file:
- Linux/Unix/OSX :
/etc/hosts
- Windows >=7 :
%SystemRoot%\system32\drivers\etc\hosts
For other OSs, see the list here.