これは機能しますが、面倒です。私はパラメータバッグをいじり回してきましたが、私が持っているコードほどうまく機能するものはありません。
同じページにリダイレクトしてクエリ文字列を削除したいのですが、これよりも適切にコーディングします。
$r = $this->request;
$url = $r->getUri();
$replace = "abc=" . $r->query->get( 'abc' );
$url = str_replace("?".$replace, "?", $url);
$url = str_replace("&".$replace, "", $url);
$response = new RedirectResponse($url);
$this->event->setResponse($response);