title: url of the current page without page name and query string
body: <p>As mentioned in the question, I want to get the url of the page without the page name and query string.</p>
  
  <p>For example my url is:<br>
  <a href="http://sub.domain.com/app/page.php?var=abc" rel="nofollow">http://sub.domain.com/app/page.php?var=abc</a></p>
  
  <p>what I want from this is:<br>
  <a href="http://sub.domain.com/app/" rel="nofollow">http://sub.domain.com/app/</a><br>
  without the query string and page name.</p>
  
  <p>I found this tutorials:<br>
  <a href="http://www.phpf1.com/tutorial/get-current-page-url.html" rel="nofollow">http://www.phpf1.com/tutorial/get-current-page-url.html</a><br>
  it was helpful but not exactly what I want.</p>
  
  <p>Thanks for your answers.</p>