[TYPO3-dev] Weird cookie problem with FE login (wrong host)

Dmitry Dulepov dmitry at typo3.org
Wed Dec 3 10:36:15 CET 2008


Hi!

Xavier Perseguers wrote:
> My frontend session cookies get generated with the wrong host information.
> 
> I have following site structure:
> 
> root
>   |-- website
>   |     `-- shared (mountpage to SP below)
>   `-- SP
>        `-- login
> 
> Default accessible domain for the website is http://cms.domain.tld. Root
>> website is accessible through http://www.website.tld. Now, for some
> reason, when I use the login form mounted on shared (and thus accessible
> through http://www.website.tld/shared/login.html, my session cookie is
> generated with host: .cms.domain.tld and as such is not sent back by my
> browser as the domains do not match => session is "terminated" and user
> cannot do anything after the login.
> 
> Did I missed some configuration setting somewhere?

When you work with mount points, mounted pages work in the context of the current domain. So if you access mounted page with login form from cms.example.com, the cookie will be set fo this domain. If you next navigate to the login form at www.example.com, you will not have that cookie because domain does not match.

There is a setting in install tool where you can set domain for login cookies. Set it to ".example.com" (note the first dot).

-- 
Dmitry Dulepov
TYPO3 core team
In the blog: http://typo3bloke.net/post-details/how_to_enable_memcached_cache_in_typo3_43/
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book




More information about the TYPO3-dev mailing list