I'm trying to configure a virtual directory in IIS 7 to target the root of a website on our server. The structure for example is as follows:
Websites:
|
--- AssetsServer
| - /images/
| - /css/
| - etc.
|
--- demoserver
- assets (this is my virtual directory pointing to "AssetsServer")
Now in the demoserver's html, I have the following code for an image that I want to target the images folder within "AssetsServer":
<img src="/assets/images/logos/my-logo.png" alt="My Logo">
The URL when viewed in the browser displays as:
http://www.mysite.com/assets/images/logos/my-logo.png
This looks like it should be targeting the virtual directory, which then goes into "AssetsServer"s image folder > logos > my-logo.png. However I get a 500 error and I suspect a configuration setting is wrong (maybe not wrong but not set how I need it). When I modify the virtual directory so that it points to "AssetsServer\images\" and modify the HTML code accordingly, the image displays fine.
The reason why I want the virtual directory to target the root of "AssetsServer" is so I can call the stylesheets or images without having to create multiple virtual directories to target the individual css or images folders.
I am new to ASP and if this question has been answered already, I do apologize. I've tried my best to search and my inexperience with the terms might be hindering the process.
Thank you.