Virtual directories in IIS7
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.
URL Rewrite
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
精彩评论