title: Javascript - how to remove domain from location.href
body: <p>I need to remove the domain name from location.href using Javascript. I have links like: <code>http://localhost/App/User/UserOrder.aspx?id=949abc91-a644-4a02-aebf-96da3ac7d8e1&amp;type=MO</code> and I need to have links without <code>http://localhost</code> and in future without it's real domain name. </p>
  
  <p>I will use those trimed links in Javascript function so I would like to trim it also in Javascript. </p>
  
  <p>I have tried: <code>window.location.href.split('/')[2];</code> but I could only get domain form it. And I want to get rid of domain. </p>
  
  <p>Any help here much appreciated!</p>