How to redirect after submitting a multi-step registration form? I want to redirect after submitting  multi-step registration (Two step registration), and also I want to prevent the automatic logging to drupal website after registration completes.

I tried the normal way

$form_state['redirect'] = 'url';  


But it doesn't work. 

Then I checked the form action, it also goes to the specified URL after completing the first step.

I just put some of the codes in my module here

function caubo_registration_form_alter(&amp;$form, &amp;$form_state, $form_id) {
if ($form_id != "user_register") return;

// custom codes
.....

if (isset($form_state['storage']['page']) &amp;&amp; $form_state['storage']['page'] == 2) {
caubo_register_page_two($form, $form_state);    
return;
}

if (isset($form_state['storage']['page']) &amp;&amp; $form_state['storage']['page'] == 3) {   
caubo_register_page_three($form, $form_state);
return;
}
}


I tried the Rules Module and implement the method here, but after completes the registration form, the user is automatically logged in to drupal website, how prevent it?
First, make sure no modules with a higher weight than yours are changing the value of $form_state['redirect'] in their hook_form_alter() implementations. Stepping through with Xdebug is a fairly easy way to do this.

If that is not the cause, then it sounds like a call to drupal_goto() is happening somewhere in the process and interrupting the page flow. If your multistep form is working up until the final step, it could well be your own code doing it. Otherwise, check if anything you are doing would trigger any hook implementations or other code that could contain immediate redirects (a.k.a drupal_goto).

Devel can also display a redirection page, which may be a useful feature when debugging this.

Finally, check that $_REQUEST['destination'] isn't being set via the URL or otherwise.