Server Fault is a question and answer site for system and network administrators. 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've registered, lets say is lawl and its pointing to my server running Win 2k8 IIS7 with PHP.

CURRENTLY, my index.php checks $_SERVER['HTTP_HOST'] and then header() to the right folder inside wwwroot.

This causes the url to look like when you go to I would like to hide what folder the app is in from the user, but i dont know how to do this. So what i want is if you go to the url stays at I have several domains and several folder (matching :D) inside wwwroot... how do i perform this magic? :D

I dont have a domain for it like .net or .com.

All i have in IIS is my Default Web Site.

share|improve this question

Why don't you create different web sites in IIS, and give each one a different virtual host name (for example, one site may have the host name and point to d:/somewhere/lawl.

Much easier than trying to do it in PHP.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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