So our multiple site setup is using one install, one db, but using the domain access module to handle the multiple top level urls. We want the drupal login page (accessed via /user) to be only handled by the default site which will will have SSL enabled. I need assistance to figure out a way to either block access to the login page from everything except the main domain or put in some form of redirect when the login page is accessed from the other urls to redirect them to the default main URL that will have the SSL certificate.
I found something on a pretty old thread that posted the following code and recommended it be added to the templates.php but I am not sure if that would still even apply in drupal 7. I am not even sure how it could be applied.
global $user;
if (!$user->name) {
drupal_goto('where redirect to' . $_GET['q']);
}
Any help or recommendations is appreciated. Thanks!