html - IIS 7 virtual directory not targeting website root? -
i'm trying configure virtual directory in iis 7 target root of website on our server. structure example follows:
websites: | --- assetsserver | - /images/ | - /css/ | - etc. | --- demoserver - assets (this virtual directory pointing "assetsserver")
now in demoserver's html, have following code image want target images folder within "assetsserver":
<img src="/assets/images/logos/my-logo.png" alt="my logo">
the url when viewed in browser displays as:
http://www.mysite.com/assets/images/logos/my-logo.png
this looks should targeting virtual directory, goes "assetsserver"s image folder > logos > my-logo.png. 500 error , suspect configuration setting wrong (maybe not wrong not set how need it). when modify virtual directory points "assetsserver\images\" , modify html code accordingly, image displays fine.
the reason why want virtual directory target root of "assetsserver" can call stylesheets or images without having create multiple virtual directories target individual css or images folders.
i new asp , if question has been answered already, apologize. i've tried best search , inexperience terms might hindering process.
thank you.
to troubleshot 500 errors on iis, need substatus (for example 500.19), check error code, in case of 500.19 errors (the more common), can start here: http://blogs.iis.net/webtopics/archive/2010/03/08/troubleshooting-http-500-19-errors-in-iis-7.aspx.
if you're not getting substatus and/or error code, should access site in server using localhost.
Comments
Post a Comment