Just installed beta 7 and created a test site with three test sub-sites. I also used "domain prefix" to duplicate the url_alias table -- allowing sub-sites to reuse paths (eg. "example.com/contact" and "sub.example.com/contact").

So far, so good -- the only serious oddity is that both logging in or out from "sub.example.com" works -- but redirects to "example.com".

Any idea why?

Comments

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

Not exactly, no. Some thoughts:

-- You don't need to prefix the url_alias table unless you do _not_ wish to share path aliases. If you only use one table, all your sites will use the same aliases. With table prefixing, one.example.com/node/3 could have a different alias than two.example.com/node/3. Make sense?

-- The logout might be related to cookie setting. Are you changing the $cookie variable of the $base_url variable in settings.php? I haven't witnessed this behavior, but I haven't been looking for it, either.

agentrickard’s picture

I cannot replicate this behavior.

chadj’s picture

That's funny because I've just done another fresh install, this time stripping out all extraneous modules and just installing Domain Access and creating one subdomain.

Logging into or out of sub.example.com redirects to example.com.

Also, the session is definitely not shared between the two domains. Could be my local Apache2triad configuration. I'll try installing on my host.

agentrickard’s picture

I suspect the login/logout issue is Apache related.

I don't know if the session needs to be shared, from a functional standpoint. I know that the cookie does, if you want multiple logins.

chadj’s picture

Ok, I just installed to DreamHost and am getting exactly the same behavior. You can try the guest/guest account at http://drupal007.com

There's a test subdomain http://sub.drupal007.com

Both logging in or logging out from sub domain redirects to the base domain. Logging in was not working at all from the sub domain before changing the cookie to ".example.com" (".drupal007.com").

agentrickard’s picture

The cookie behavior is expected (and documented).

I'm not sure why the site redirects on login/logout, however, though I did see the behavior.

I think this is a hosting or Apache configuration issue. See http://drupal.org/node/196217 for a related discussion.

We need to document why this happens.

I should also point out that this module is not really intended to be run on shared hosts. You really need to have control over your environment.

I am also curious: Does turning on strict SEO make this go away?

agentrickard’s picture

By the way, it isn't just login/logout. Your demo site routes _all_ forms to your root domain -- I edited my account on sub.* and it bounced me to *. So http://drupal.org/node/196217 is very germane to this problem.

chadj’s picture

What is the "Strict SEO" option? Sorry, I can't find any "SEO" reference in the modules. You mentioned "SEO option" in another posting but I don't see anything by that name in the "Domain Access" settings.

agentrickard’s picture

Sorry. The SEO option is in HEAD, not in the beta7 release.

chadj’s picture

Status: Postponed (maintainer needs more info) » Fixed

http://drupal.org/node/196217 was very germane. Thank you!

Because I've always setup drupal in a tidy subfolder (like /example.com/drupal/drupal-5.5/), I've consequently always used $base_url to get rid of the extra folder paths. Allowing friendly URLs like "http://example.com/contact" instead of "http://example.com/drupal/drupal-5.5/contact".

Setting $base_url fixes my paths but causes this redirection problem.

I guess the two options with "Domain Access" are either to

1) install Drupal in the base folder and not assign $base_url or

2) modify settings.php to assign a dynamic $base_url value.

agentrickard’s picture

Right. Let Drupal determine $base_url for you.

So that means it works on Dreamhost, right?

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.