A HTTP 3xx redirect does NOT have a body so you can't include data via render
and use redirectToRoute('redirect_target_route', array('A' => 'smth'})
at the same time.
You'd need to save the data in a session flashbag and get it from there inside the controller action for redirect_target_route
.
public function redirectingAction(Request $request)
{
// ...
// store the variable in the flashbag named 'parameters' with key 'B'
$request->getSession()->getFlashBag('parameters')->add('B', 'smth_else');
// redirect to uri?A=smth
return $this->redirectToRoute('redirect_target_route', array('A' => 'smth'});
}
public function redirectTargetAction(Request $request)
{
$parameterB = $request->getSession()->getFlashBag('parameters')->get('B');
// ...
}