different form state redirects in a hook_form_alter i have the code in template.php:

THEMENAME_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'answer_node_form' &amp;&amp; !isset($form['nid']['#value'])) {
    //dpm($form);
    // redirect after we created a new node
    $form['actions']['submit']['#submit'][] = 'node_reference_redirect';
  } elseif ($form_id == 'answer_node_form' &amp;&amp; isset($form['nid']['#value'])) {
    // redirect after we have made changes to a node - node/17/edit
    $form['#submit'][] = 'node_save_reference_redirect';
  }
}

function node_reference_redirect($form, &amp;$form_state) {
  $form_state['redirect'] = 'node/' . arg(1);
}

function node_save_reference_redirect($form, &amp;$form_state) {
  $form_state['redirect'] = '/index.php';//$form['field_answer']['und'][0]['nid']['#default_value'];
}


function named node_reference_redirect() works as expected - it redirects after creating a new node: node/add/content-type, but the 2nd redirect - when we are doing changes to an existing node: node/[nid]/edit, when we press "save" it doesn't redirects to a index.php for example... Can't figure out what's wrong. Any ideas? Thanks
I think it should be like:

$form['#redirect'] = $base_url';


you are missing '#' in both of the forms.