URL query clearing php code problem
<p>This is the code that im using for clear any queries in my url..</p>

<pre><code>&lt;?php
function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
  $pageURL = substr( $pageURL, 0, strrpos( $pageURL, "?")); 
 }
 return $pageURL;
}
?&gt;
</code></pre>

<p>this clears </p>

<blockquote>
  <p>www.mydomian.com/myurl.html?<strong><em>*</em>****</strong></p>
</blockquote>

<p>result is </p>

<blockquote>
  <p>www.mydomian.com/myurl.html</p>
</blockquote>

<p>Its done....but the thing it when its come with normal URL </p>

<blockquote>
  <p>www.mydomian.com/myurl.html</p>
</blockquote>

<p>The result is EMPLTY,NO RESULT ! 
BUT i want as it is.. 
no change..</p>

<blockquote>
  <p>www.mydomian.com/myurl.html</p>
</blockquote>

<p>i want the result normall url as it is...
Thank You! </p>
