redirect to custom page In my custom module, I created a custom link using

function MYMODULE_menu() {
$items['addcontent'] = array(
    'title'
    =&gt; 'Confirmation page',
    'page callback'
    =&gt; 'add_content_confirmation',
    'access callback' =&gt; TRUE,
);
return $items;
}
function add_content_confirmation() {
return 'Thank you';
}


When I check mydrupal/addcontent, this link works fine

In my template.php, I added

function MYTHEME_form_alter(&amp;$form, $form_state, $form_id) {
  if($form_id == 'my_form_id'){
    $form['actions']['submit']['#submit'][] = 'my_custom_submit';
}
function my_custom_submit()
{
  $form_state['redirect'] = 'addcontent';
}


wich redirects me to my home page.

if I write 

$form_state['redirect'] = 'node/add/mycontent';


That works fine.

How can I fix it?

Thank you
This:

function my_custom_submit()


Should be this:

function my_custom_submit($form, &amp;$form_state)


Right now you are setting redirect on a variable that doesn't exist.