title: How can I get the path of the current URL in JavaScript for CodeIgniter usage?
body: <p>For example: <code>http://localhost/example/testpage/this?page=2</code></p>
  
  <p>I want just the <code>http://localhost/example/</code></p>