I manage a site which uses both Drupal (6) and CiviCRM. We must have the security setting for creation of Drupal user accounts set to "wide open" as CiviCRM is responsible for provisioning accounts.
Thus, I have a simple redirect as follows:
# .htaccess
# Redirect Drupal anonymous create user account to the Membership Levels page
redirect 301 /user/register http://domain.org/Membership_Levelswhich works splendidly, except... using the non-clean URL does not get picked up by that 301 rule. I came across this post:
http://drupal.stackexchange.com/questions/18020/redirect-user-register-t...
which mentioned creating a theme function. I have done so, and have not gotten it to work. I am attempting to "clean up" the suggested code based on the Drupal API reference, so my current code (which is still not working) is as follows:
/*
* Customization of Drupal User Registration
*/
function cir_preprocess_page(&$variables, $hook) {
if(arg(0) == "user" && arg(1) == "register") {
drupal_goto("Membership_Levels");
}
}
Suggestions as to what I am missing in order to get this seemingly simple and elegant solution working?