title: Remove last params from url
body: <p>How to remove last params from the url for instance, i have url such as </p>
  
  <p><a href="http://localhost/autoservice/public_html/tickets/load_service/6" rel="nofollow">http://localhost/autoservice/public_html/tickets/load_service/6</a></p>
  
  <p>i want to get this result</p>
  
  <p><a href="http://localhost/autoservice/public_html/tickets" rel="nofollow">http://localhost/autoservice/public_html/tickets</a></p>
  
  <p>how to make this with jquery or javascript</p>
  
  <p>i have tried many solutions by reading many post on stack but i can't get it right </p>
  
  <pre><code> var url       = $(location).attr('href');
  </code></pre>