Some background — WordPress is really annoying in terms of what hostname you access it from, which makes creating testing environments rather painful (That is, I could create a subdomain for staging, y.x.com, but then WordPress would set all the links in the database as being from there and not x.com, which is where they will be as soon as I do the DNS changeover). To get around this, I've setup an alias in my /etc/hosts file, so I don't have to keep changing the domain name in WP's settings.
In other words: right now I have a live site running on IP x and hostname x.com. I want to leave the live site running, and have setup a staging machine at IP y, accessed via the hostname x.com, using an entry in the aforementioned /etc/hosts.
My question: How do I show the staging machine to the client without having them edit their /etc/hosts file? Is there a service online that setups an iframe and shows you a particular IP as a particular hostname?
Thanks!
Edit: I'm not asking how to setup my DNS records; they're good for the moment. I can browse to the staging machine just by typing its IP into the address bar, and WordPress loads and everything's great, except all the links are to x.com, and clicking them takes me to the live/production site. I can rectify this by putting an entry into my local machine's hosts file (I.e., /etc/hosts), which overrides the public DNS records to the live site and instead shows me the staging machine. I'm essentially wanting a way to do this easily for my client, that is, without him having to edit his hosts file.