title: Using site root relative links in Razor
body: <p>I have a website that is working fine with Razor (C#) all the coding is working properly when I use my local testing (WebMatrix IIS).</p>
  
  <p>When I put it "online" on my server the website is not at the root of the site it self</p>
  
  <p>For example:</p>
  
  <p>http:// intranet.mycompany.com/inform</p>
  
  <p>That's basically the "root" of my folder structure so all my folders starts from there (css file default.cshtml... and so on)</p>
  
  <p>My "_PageStart.cshtml" sees it properly cause when I access my site from the link <a href="http://intranet.mycompany.com/inform" rel="noreferrer">http://intranet.mycompany.com/inform</a> it gives me the Layout I have configured in _PageStart.cshtml (and it really show the layout + the rendered default.cshtml)</p>
  
  <p>BUT nothing else is getting the proper path, for example : </p>
  
  <pre><code>&lt;img src="~/images/logos/hdr.png" /&gt;
  </code></pre>
  
  <p>The img holder is there I can see it but shows that the link is broken... when I Right-Click the img holder and do properties to see where the files should be it shows me : </p>
  
  <p>http:// intranet.mycompany.com/images/logos/hdr.png</p>
  
  <p>So it's going to the "full" root not the relative root...</p>
  
  <p>How can i fix that ?</p>