Home ›
Redirect to Drupal front pageRedirect to Drupal front page
Submitted by Benjamin Melançon on September 24, 2008 - 6:32pm
<?php
// if the data's not good, send us to the home page
// note: drupal_goto without any arguments sends to / - the front page
// or could use <front> -- url() is called and treats the same
// so this is not necessary:
return drupal_goto(drupal_get_normal_path(variable_get('site_frontpage', 'node')));
// this will do:
return drupal_goto();
?>
Resolution
More like this
- Ask Agaric: More contact page options for redirecting and spam protection
- I thought there was a page-front.tpl.php or similar option for Drupal 5 themes
- How to add CSS and Javascript just for the front page, as for a custom GMap call
- Infinite redirect loop trying to go to anything but the front page
- Pass information from a URL into a Drupal page or form


Comments
Post new comment