My client has two iis7 websites www.myfakedomain.co.uk and sub.myfakedomain.co.uk. They are .net websites running along side each other on the same server.

We want to "move" the content of sub.myfakedomain.co.uk so that it appears under www.myfakedomain.co.uk/sub but we want them to remain separate applications in iis for operational reasons.

Is this possible? What are our options?

2 Answers 2


Yes. You can create the appropriate virtual directory for /sub, and then convert the directory to an application so that you can assign a separate pool.

  • Thanks. In case anyone else is trying this we found that we needed to add location tags to the parent apps config to stop it from inheriting down <location path="." inheritInChildApplications="false"> msdn.microsoft.com/en-us/library/… Aug 27, 2015 at 14:25

You need to use IIS rewrite rules. I've done this before myself.

The key is to add this 1 more condition at the beginning of the conditions collection:

<add input="{HTTP_HOST}" pattern="^www\." negate="true" />

Here's a thread with a lot more detail: http://forums.iis.net/t/1161322.aspx?URL+rewrite+for+subdomain+to+subfolder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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