Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mcgarry

macrumors 6502a
Original poster
Oct 19, 2004
616
0
Hi,

I host a few websites from an iMac at my place, and use a PowerBook (10.3.7) both on an off my LAN. To be able to access my sites while on my LAN, I have to edit my hosts file (/private/etc/hosts) so that certain domain names point directly to the iMac.

When I am not on my LAN, however, and using my PB via an alternate internet connection, if I want to access my own sites, I have to go back in and re-edit my hosts file (removing the lines pointing those domains to the iMac).

I am able to change other network/connectivity settings via the Location function in the Apple menu; is there a way to have the hosts file automatically adjust itself /swap for another version when I change Location from the Apple menu? I imagine there's some complicated script that could be written to do this, but maybe someone already has ...

Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.