Virtual directories in IIS7

300 Views Asked by At

I have a domain like: clients.mydomain.com which I want to be able to run multiple websites under as a quick demonstration area for clients, so I might have:

clients.mydomain.com/client1
clients.mydomain.com/client2

The problem is when we develop websites we always like to use root relative links, so referencing a CSS file would look like href="/css/myfile.css". When a HTML file is dropped into the client1 or client2 folder, it believes the website root to be clients.mydomain.com and therefore it cant find the css files - the links are broken.

Is there a way of setting up a virtual directory which is set as the root? Otherwise we will have to setup a sub-domain for each client which is a real pain and untidy on the server.

1

There are 1 best solutions below

2
On