[Moin-user] wikifarm and cookie_domain

Ralf Gross Ralf-Lists at ralfgross.de
Thu Feb 15 03:03:35 EST 2007


Juergen Hermann schrieb:
> On Wed, 14 Feb 2007 14:46:31 +0100, Ralf Gross wrote:
> 
> >I tried different settings of cookie_domain and cookie_path, but
> >couldn't find a solution so that a user stays logged in to all wikis,
> >even if only the host name part stays the same.
> 
> I doubt you'll solve that without a little code.
> 
> Add a dict to the config that maps domains used by the users to canonical form (that 
> used in cookie_domain).
> 
> Find the function that sets the cookie, then replace the canonical domain path in the 
> cookie with the current values from the Host header, AFTER you checked that the host 
> header domain is in your config dict and thus valid.

Thanks for you answer. I could solve this problem with a rewrite rule on the
server side.

RewriteEngine On
RewriteCond %{HTTP_HOST}   !^hostname\.my\.domain\.com [NC]
RewriteRule ^/(.*) http://hostname.my.domain.com/$1

This working like a charm :)

Ralf




More information about the Moin-user mailing list