Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Is there a way to have requests to subdomains have files served from subdirectories? The sites should regard their folders as root.

A request to should serve the page ./blog/default.aspx which has an img tag like

<img alt="logo" src="/content/pics/logo.png" />

which should serve the ./blog/content/pics/logo.png file. When I run the same site on my localhost the site will not be in a subdir /blog and the same page should still serve the correct image.

My site is hosted on an IIS7 shared hosting site ( and preferably deployed with the webdeployer. I have IIS manager to my disposal. Any help?


  1. The IIS manager connection to the discountasp account doesn't contain the "Sites" node as illustrated in the image below
  2. DiscountAsp support is swift :)
    They suggested I would have a redirect script in my main that would take the job of redirecting any request to the correct subpath. This is not really an option as this requires me to merge all my applications into one big one.

alt text

share|improve this question

migrated from Nov 29 '10 at 19:00

This question came from our site for computer enthusiasts and power users.

Have you tried making a seperate site in IIS, using the subdomain address, but just pointing to the subdirectory as the root directory?

share|improve this answer
I would if I could. The "Sites" node is invisible in my IIS manager so I'm assuming I don't have the rights to create multiple sites on my shared hosting account. I'm going to mail them about this after work. – Boris Callens Nov 29 '10 at 9:51
Updated original post with the conversation going on between aspdiscount support ppl an me – Boris Callens Nov 29 '10 at 17:50

Try in IIS:

  • Right click site
  • Add Virtual Directory
share|improve this answer
See OP on why this is impossible – Boris Callens Nov 29 '10 at 18:26

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.