How to redirect from subdomain login page to main domain login page across multisite and shared user environment?

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by sid3000 on April 10, 2008 at 8:34pm

Hi,
I have one main site (mydomain.com) and one members subsite (members.mydomain.com). In this case members.mydomain.com is master site but cookie domain in settings.php of master site (members.mydomain.com) is mydomain.com. And that works perfectly.

But I want user can signup/login through members.mydomain.com/user page, that mean if any user can click on mydomain.com/user link, it will be redirected into members.mydomain.com/user page with destination link.

Any idea, help or guidance appreciated.
Thanks.
sid.

Comments

you can try adding this code

Posted by Ainur on July 23, 2008 at 6:34pm

you can try adding this code to your template.php file

<?php
global $user;
if (!
$user->name) {
drupal_goto('where redirect to' . $_GET['q']);
}
?>

Thanks for your good reply

Posted by sid3000 on December 28, 2008 at 6:58pm

Thanks for your good reply

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /