在PHP中访问本地计算机上的子域

I have PHP source code of http://www.sitename.com. I can access it by using sub domain http://www.demo.sitename.com . I have copied all source code from live and stored it on my local machine (e.g. 192.168.15.24).

On local machine WAMP 2.0 is installed.

I have tried to run as following way, but those are wrong.
1. http://192.168.15.24/sitename/demo
2. http://demo.192.168.15.24/sitename/

How can I run the page http://www.demo.sitename.com from my local machine’s IP?

A quick hack that might help:

Open %windir%\system32\drivers\etc\hosts e.g. C:\windows\system32\drivers\etc\hosts in a text editor like notepad. Add a line with 192.168.15.24 www.demo.sitename.com. Now visiting www.demo.sitename.com will connect to your LAN IP instead.