[Zope-CMF] VirtualHostMonster & CMF question

Kevin Carlson khcarlso@bellsouth.net
Tue, 23 Jul 2002 17:08:07 -0400


Don't know if this is the most elegant solution (probably not), but this
seems to work.  I added the following two lines of code at the top of the
index_html DTML method in skin3:

<dtml-call "REQUEST.RESPONSE.setCookie('portal_skin', 'skin3', path='/')">
<dtml-call setupCurrentSkin>

Can anyone see any potential issues occurring with this?

Thanks,

Kevin

-----Original Message-----
From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf
Of Kevin Carlson
Sent: Tuesday, July 23, 2002 2:46 PM
To: zope-cmf group
Subject: [Zope-CMF] VirtualHostMonster & CMF question


In my CMF implementation, I would like for the user to be directed to a
different skin depending upon the DNS name used to access the site.  I have
placed a VHM in the Zope root and placed a rewrite rule in Apache.  All
seems to work well, except when accessing documents that are contained in a
portal folder that is shared by all of the skins.

Here's the setup.

Zoperoot
   |- CMFSite
   |    |- Documents
   |    |- portal_skins
   |    |   |- skin1
   |    |   |- skin2
   |    |   |- skin3

The default skin for the CMF site is skin1.  skin2 required the user to
login, which changes the cookie and all works fine.  However, skin3 is being
accessed through a rewrite in apache:

RewriteRule ^/(.*)
http://10.10.1.105:8080/VirtualHostBase/http/skin3.server.domain.net:80/CMFS
ite/portal_skins/skin3/VirtualHostRoot/$1 [P]

This works fine until I try and direct the user to a document in the
Documents folder.  For example, the link:

http://skin3.server.domain.net/Documents/docid/view picks the file_view
object(this object is associated with the view action for a portal_type),
but it picks up the one from the skin1, the default skin. It appears that
this may happen because of the way in which acquisition works...

Can anyone suggest a manner in which accessing items in the Documents folder
would not cause this behavior?

Thanks,

Kevin


_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests