title: fix preceding forward slash in php
body: <p>I am trying to create a local copy of a website by installing the same XAMPP version and downloading the files and mysql.</p>
  
  <p>On the web server the files are saved at <code>http://www.website.com/html</code> but it is accessible through website.com</p>
  
  <p>I made my own in this directory <code>http://localhost/website.com/html</code></p>
  
  <p>I am having trouble with the script because all the css and javascript have a preceding "/"</p>
  
  <pre><code>src="/js/prototype.js"
  </code></pre>
  
  <p>I cant explain it very good but this is a sample problem</p>
  
  <p>The script originally have this</p>
  
  <pre><code>&lt;link href="/_design/_master.css" rel="stylesheet" type="text/css"&gt; 
  </code></pre>
  
  <p>That doesn't work on my local install but works on the online version. But if I remove the first / on my local install it works.</p>
  
  <pre><code>&lt;link href="_design/_master.css" rel="stylesheet" type="text/css"&gt;
  </code></pre>
  
  <p>This link also works on the online version</p>
  
  <pre><code>&lt;a id="logout" href="/logout.php"&gt;logout&lt;/a&gt;
  </code></pre>
  
  <p>But on my local version it links to only <code>http://localhost/logout.php</code> but it is supposed to be linking to <code>http://localhost/website.com/html/logout.php</code></p>
  
  <p>When I remove the first / it works how ever there are so many of them and I might miss some.</p>
  
  <p>Is there a setting for php for fixing this? Or did I put it on the wrong directory? Please help. Thanks!</p>