title: Base URL in ASP.net Master Pages with virtual Directories
body: <p>I have an ASP.net master page. In this master, I have all my css and javascript files defined. I also have a few images and a few buttons and hyperlinks.</p>
  
  <p>All the urls are all declared as relative ie "/scripts/ian.js"</p>
  
  <p>Everything works fine if this site is the root website, but I need it to work in a virtual directory.</p>
  
  <p>My problem is when I place this website in a virtual directory under a root site, all my links are pointing to the root site. so my links point to www.root.com/scripts/ian.js but it should be pointing to www.root.com/virtualDir/scripts/ian.js</p>
  
  <p>I thought the  <a href="http://www.w3schools.com/TAGS/tag_base.asp" rel="noreferrer">Base Href</a> tag in the header would help, but so far it does not seem to be helping in anyway. All the links are still pointing to the root website when i hover over them.</p>
  
  <p>What I would like is a single setting either in IIS or the config file that I can set a root url and any image, script or link either on the master page or content page, would point to the right place.</p>
  
  <p>Any suggestions or ideas are welcome.</p>
  
  <p>Thanks</p>