title: window.location.href does not redirect to a different domain
body: <p>I'm using XAMPP, and I have two directories in htdocs. Basically, I am trying to do the following:</p>
  
  <p>A button from <code>localhost/folder-website1 directs</code> me to <code>localhost/folder-website2</code></p>
  
  <p>If it's any helpful, website2 is a Lumen project that serves as an API, and I'm trying to see if I'm able to connect to it.</p>
  
  <p>Edit:</p>
  
  <p>In website1, I have a button that does the following:</p>
  
  <pre><code>function test(){
      window.location.href = "localhost/website2/public";
  }
  </code></pre>
  
  <p>From what I see, the URL becomes </p>
  
  <pre><code>http://localhost/website1/localhost/website2/public
  </code></pre>