On a multilingual site, I'm using Domain Alias with the following two language-specific subdomains (as specified both in
So far, everything fine.
Using Domain Alias, I'm now trying to redirect
de.foo.de to plain
The result is that in the German locale I'm not able to log in anymore.
de.foo.de correctly sends me to
foo.de, however at
foo.de, Drupal refuses to write a session cookie at all, no matter if I set
.foo.de or leave it commented out.
(Certainly, a session cookie
de.foo.de wouldn't be helpful when immediately redirecting to
foo.de. However, in combination with
$cookie_domain this should work fine allowing me to use
de.foo.de as a valid alias of
foo.de for every path given. But let's leave that apart to reduce complexity at this point.)
The first approach would be that Domain Alias redirects too early, not allowing Drupal to write a cookie for
A second approach would make Domain alias redirects take precedence over the Language domain specified in
admin/config/regional/language, resulting in Drupal writing a cookie for
While a workaround (and maybe the more straightforward solution) would be to rightaway specify
foo.de instead of
de.foo.de as Language domain in
admin/config/regional/language, the other setup shouldn't lead to a tricky error.