Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to forward different domain names to single IP Address (local for testing), but how can i recognize in pc that which domain name should be linked to which folder?

For example in my windows host file I have added the following entries:       abc.com       test.abc.com       test1.abc.com
share|improve this question

closed as not a real question by paulmorriss Feb 28 '13 at 17:17

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Question doesn't make sense. Give us an example of what you have tried and what does or doesn't work – Steve Jun 15 '12 at 7:05
Can you specify which webserver you're using (e.g. Apache or IIS) so that we can give more specific instructions? – paulmorriss Jun 15 '12 at 11:46
up vote 1 down vote accepted
  1. When request is sent from browser to website, the "Host" header is sent which will contain the host name (e.g. Host: test.example.com).

  2. Web server (Apache, IIS, nginx etc) will check that request header and will route to correct virtual site / folder accordingly to the rules that you have defined in your web server configuration (when creating website in web server, you providing to what host names it should respond to).

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.