Redirect after a new node is added but not edited I have a custom redirect on node submit.

function mymodule_form_alter(&amp;$form, $form_state, $form_id) {
    $form['actions']['submit']['#submit'][] = 'custom_node_submit';
}

function custom_node_submit($form, &amp;$form_state) {
    $form_state['redirect'] = 'request-sent';
}


However, I would like to redirect only when a new node is created but not updated.
How do I check the action being executed on the node ?
function mymodule_form_alter(&amp;$form, $form_state, $form_id) {
    $form['actions']['submit']['#submit'][] = 'custom_node_submit';
}

function custom_node_submit($form, &amp;$form_state) {
    if (arg(2) != "edit") {
      $form_state['redirect'] = 'request-sent';
    }
}