views:

25

answers:

1

Hi all,

I am trying to develop a small web application which will consist of one web applicaiton using an iframe from another domain. I am trying to test this on my local machine, and for this I need to imitate as if the iframe is coming from another domain (while it's actually on the same domin as the other web application - my computer). Can this be done? If so, how?

Thank you

+4  A: 

Test it through a local http server (just in case your were accesing to the local files).

Define 2 different vhosts in your http server.

Edit your etc/hosts file to add:

127.0.0.1 domain1.com 
127.0.0.1 domain2.com

So now you have 2 different sites, but running on the same computer.

LatinSuD
Use a fake TLD though (e.g. domain1.local). That will stop you getting confused if you ever need to access the real domain, and will reduce issues if your development code goes public by accident.
David Dorward
how do I actually do it with iis?
vondip
Sorry i'm no expert on IIS, try search for "vhost" and "iis". Eg:http://plone.org/documentation/kb/staged-site/iis_vhost_conf.jpg/view
LatinSuD
ok, checking it out.Thank you
vondip
ok, seems that if I overload localhost \ 127.0.0.1 I cannot run both websites. if i give a different domain I recieve an error. What should I do here?
vondip