I'm currently developing a site that has an existing/live site. But we have our development site/new version on another server and ip address. But we want our customer to access the dev site using the same address of the live site. We do these by adding the ip address and domain to the hosts file. I also added the corresponding entry to my hosts file. Now my problem is that when I'm going to access the site, the page that will be loaded is different (i am expecting the dev site to be loaded), it looks like the live site is loaded but I still need to refresh it to load the dev site. In addition to that, I don't need to refresh the site when I'm on another network. I recently learn that OS lion handles dns differently, in which it resolve dns in a different order, the host file is not check at first. But I have already solve it by installing a local dns which now enables my system to read first the hosts file before going to the external dns server.
Does anyone encounter the same problem? How should I solve this problem. Is it something with my ISP, hosts file, dns configuration on the dev server or htaccess?