On Wednesday 14 June 2006 10:30 pm, Arto Bendiken wrote:
On 6/14/06, Anguo <linux-tw@masquilier.org> wrote:
I said I know how to do a redirect in php. I would like to know how to do it the 'Drupal Way' (drupal_goto() handles aliases, etc...).
Since drupal_goto() outputs the Location header and terminates script execution, just set the 301 header before calling it:
header('HTTP/1.1 301 Moved Permanently'); drupal_goto(...);
What a simple solution. I like it! thanks a lot, Arto! Augustin. -- http://www.wechange.org/ Because we and the world need to change. http://www.reuniting.info/ Intimate Relationships, peace and harmony in the couple. http://www.gnosis-usa.com/ Revolutionary Psychology, White Tantrism, Dream Yoga... http://www.masquilier.org/ Condorcet, Approval alternative, better voting methods.