Timeline for Editing Hosts File to Redirect URL to different IP Address
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 26, 2011 at 16:01 | vote | accept | Jacob Lamont | ||
Sep 23, 2011 at 22:33 | comment | added | Nicholas Smith | Try deleting the hosts files found at <username>/ and /etc, then cp the /etc/private one over into /etc with sudo. It'll break that SwitchHosts thing, but might resolve your issue. | |
Sep 23, 2011 at 20:36 | comment | added | Jacob Lamont |
Ok, so I tried editing the hosts file in <username> by typing the command nano hosts from within my <username> directory. I also tried editing the one in the 'etc' directory by typing nano /etc/hosts from within my <username> directory. Both files now have 199.204.138.195 zionica.com www.zionica.com in them. It still doesn't work - the page points to the original IP address; not the one defined in my hosts file.
|
|
Sep 23, 2011 at 16:38 | comment | added | Nicholas Smith | Ah, thought we might get lucky and find that it was a simple one. So if you've run switchhosts your hosts file now exists outside of /etc (kind of). The ln command creates a symbolic link between the files so /etc/hosts points to <username>/hosts. OS X reads /etc/hosts first and it's normally a symlink to /etc/private/hosts, so editing /etc/private/hosts won't update /etc/hosts. You can either edit the hosts file in <username>, or /etc/hosts and that should do it. | |
Sep 23, 2011 at 15:55 | comment | added | Jacob Lamont | Thank you for your response! I've actually tried running that command numerous times but with no results. | |
Sep 23, 2011 at 15:35 | history | answered | Nicholas Smith | CC BY-SA 3.0 |