I have been doing web development for a while, but one thing has always bugged me. I have multiple web clients, each with their own site contained in its own folder in my wwwroot directory. Each folder is its own virtual web so they are all acessible and can stay in their own spot. So far so good.
The problem is when I'm actually coding. As coders know, to display images or includes or what have you, you can do "/imagedir/name" or "../imagedir/name" (note the periods to say only go back 1 directory). My question is, when I use the first method ("/imagedir/name") to display an image or include by going to the root of the web directory, it goes back to the root of the wwwroot folder itself instead of the virtual web folder. Is there anyway around this? I get around it by moving the site I am working in to the root of the wwwroot folder so that it works, but I would love to keep each in its own virtualweb and typing "/" in the code would only take me to my virtualweb root, not my IIS root. Thanks for any help.
The problem is when I'm actually coding. As coders know, to display images or includes or what have you, you can do "/imagedir/name" or "../imagedir/name" (note the periods to say only go back 1 directory). My question is, when I use the first method ("/imagedir/name") to display an image or include by going to the root of the web directory, it goes back to the root of the wwwroot folder itself instead of the virtual web folder. Is there anyway around this? I get around it by moving the site I am working in to the root of the wwwroot folder so that it works, but I would love to keep each in its own virtualweb and typing "/" in the code would only take me to my virtualweb root, not my IIS root. Thanks for any help.
