redirecting to url that will never complate i used this code to redirect page to another  

$path=$_SERVER['QUERY_STRING'];
$new_path= 'http://localhost/mysite/print/194?0=' . $path;
drupal_goto($new_path);


but when requesting that page this error show up:  



and the url in the address bar is:
http://localhost/mysite/print/194?0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=f1=All&amp;f2[value][year]=&amp;f2[value][month]=
but when i print the $new_path using drupal_set_message the url looks like correct one
Can you help me to solved it? thanks.
The biggest issue is that the query string should be passed in separate from the base URL itself, eg, it should be part of the $options array argument to drupal_goto().  Otherwise, as you've noticed, drupal_goto() doubles up a lot of times.  If you fix that, I am fairly confident that you will get it to work.

Check out http://api.drupal.org/api/drupal/includes!common.inc/function/drupal_goto/7
and
http://api.drupal.org/api/drupal/includes%21common.inc/function/url/7 
for more information on this.