if($PATH_INFO=="")
 return $PHP_SELF . '?' . $QUERY_STRING
else
 return $PHP_SELF . $PATH_INFO. '?' . $QUERY_STING;

$QUERY_STRING