arthurnegas — 2012-12-07T06:00:27-05:00 — #1
If I'm working on a development site, I set the hosts file to point to my version of the website. However, there are times I'd like to simultaneously have the current live site open at the same time so that I can transfer over content etc.
I don't want to be constantly commenting out the hosts file and flushing the DNS and thought that I might be able to access the live site by its IP address rather than domain name but it's timing out. Same happens when I ping the domain name through command prompt.
I just wandered if anyone had any ideas for an alternative way to approach this. I've tried dropping the www but it still redirects and then picks up my hosts file which sends it back to my version.
Hope that make sense and thanks in advance for any suggestions.
pip — 2012-12-07T06:17:02-05:00 — #2
Why not just used a different host name for your development site? What I would do is add an entry in hosts like,
So that the dev site would always point there, and I can still load the live site simutaneously
arthurnegas — 2012-12-07T06:34:26-05:00 — #3
That's a simple but brilliant solution that I'm embarrassed not to have thought of myself!
pip — 2012-12-07T06:53:03-05:00 — #4
Not to worry. We all have our moments and as developers, tend to always try and over complicate things. But it's the simple ways that tend to work best
wwb_99 — 2012-12-07T08:08:32-05:00 — #5
Why bother with hosts, just use an alternate port.
pip — 2012-12-07T12:10:14-05:00 — #6
Must say, I do prefer the hosts approach. Quick and easy.
The port thing would also do the trick, but I hate having to do the "domain colon port" thing when accessing my sites. Preference I 'spose