How to redirect toward a specific node from front-page in Drupal 7? I have a multi language site made in Drupal 7. And I want to check if I am on the front page then if true to redirect the user to a to some specific node. 

I have tried different methods: 


to create a page front--page.tpl.php and then to check language and then redirect
I have put this code in page.tpl.php:

 global $language;

 if ($node-&gt;nid == 1) {
     if ($language-&gt;language == "en") {
         header('Location: en/home');
     } elseif ($language-&gt;language == "fr") {
         header('Location: fr/accueil');
     }
 }

I am using i18n module for Drupal 7 so I have tried also to use $conf['i18n_variables'] in settings.php like that:

  $conf['i18n_variables'] = array(
     'site_frontpage',
     'site_name',
  );



But I have not succeed to do it. Have you any suggestions ?
page--front.tpl.php simply allows you to create a different page template than the default page.tpl.php template. When drupal loads the homepage and there is a page--front.tpl.php it will laod that template instead.

If you want to check if you are on the homepage you can use the is_front variable. It would be best to use hook_boot in a custom module. 

hook_boot(&amp;$vars) {
  if($vars['is_front']) {
    // do your redirect
  }
}


You can use drupal_goto() to handle the redirect.