I can successfully use path modifiers to access taxonomy and OG spaces for both anonymous and authenticated users. But when I switch to subdomain modifiers, the space works for anonymous users but the page returned for authenticated users indicates they are no longer authenticated. Navigating to any space-disabling page (via a menu) shows the user as logged in.
I am not using a multi-site setup as my understanding is that Spaces / PURL can create and use the subdomain urls (which is what I'm looking to achieve). I am also using a stock htaccess file.
Is this a configuration issue (additional modules needed, different Apache or htaccess config, etc)? - a known issue? - or a problem anyone else can duplicate or has found?

Problem found on:
Fedora Core 14; Apache 2.2.17; Mysql 5.1.55-1; PHP 5.3.5-1;
Drupal Core 6.20
Spaces 6.x-3.1
Purl 6.x-1.0-beta
GlobalRedirect 6.x-1.x-dev
Pathauto 6.x-1.5
OG 6.x-2.1
Spaces_og 3.x-3.1

My vhost file is as follows:

DocumentRoot /var/www/html/example/dev2
ServerName example.com
ServerAlias clients.example.com
ServerAlias staff.example.com

Thanks for any input,
Eric

Comments

tebb’s picture

Hi Eric.

I haven't used spaces/PURL yet, but a quick thing you could look at is the cookie domain in your settings.php.

If you want to be able to move between subdomains eg:

sub1.yourdomain.co.uk
sub1.yourdomain.co.uk
sub1.yourdomain.co.uk

and stay logged in, your cookie domain needs to be

.yourdomain.co.uk

This forces the cookie(s) to be sent by your browser, irrespective of which subdomain you were on when you logged in.

(As far as I can remember the first '.' is needed. You might have to try both .yourdomain.co.uk and yourdomain.co.uk)

Interested to know if this solves your issue.

eric__’s picture

Yes, thank you, you were quite right Dru-p. Setting the cookie domain solved my issue. This is done in settings.php like the following for D7:

$cookie_domain = '.example.com';

Eric