[Zope-CMF] VHM behaving weird on items in a folder with it's ownsubdomain

Sune Brondum Woller sune at syntetisk.dk
Tue Nov 11 09:05:36 EST 2003


Hi Gitte,

This has actually more todo with Zope and VHM than CMF

Zope has no information about the domains you publish
your content on, all information about this is in the
apache rewrite rules.

All Zope gets is an url like
http://[IP-NUMBER]:10180/VirtualHostBase/http/sub.mydomain.com:80/www/subfol
der/VirtualHostRoot/folder/

Zope traverses to www/subfolder/folder/
and all Zope-generated urls (URL0, URL1 etc.)
in this request gets http://sub.mydomain.com:80/ as a host base.

***Zope doesn't know which domain a given folder is/should be published
on.***

So the problem can't be solved only with VHM.

There are other problems in a CMF scenario,
zope gets portal root etc. from the tools in the cmf site root. These urls
also get
processed by VHM, that adds VrtualHostBase to all urls generated by Zope.

A quick solution could be to add an objects domain to its catalog entry, and
generate your
own urls.
But i dont know what other problems that might cause....

Try to take the eksample from the Zope book and write out REQUEST - gives a
good idea of what is
going on.

/sune woeller

>
>
> Hello,
>
> I have been trying some different setups with VHM, because I simply don't
> understand what is happening :-)
>
> I created a new instance for testing purpose.
> Here I had a CMF site and told apache to rewrite URLS so this
> site could be
> accessed by www.mydomain.com - that worked great!
> Inside the CMF site I created a folder. Now I told apache to
> rewrite urls for
> this folder, so it could be accessed by folder.mydomain.com
> That worked great. I had kept the defualt skins, and the urls at the top
> (pointing to Members, News etc) had links to e.g.
www.mydomain.com/Members
(which is exactly what I wanted).

Now I moved the setup to another site. But the links in the folder doesn't
point at www.mydomain.com (as I would expect) but points to
folder.mydomain.com (I'm not talking about the items inside the folder, but
links to e.g. Members and so)

Any idea how to prevent this?

My rewrite rule looks like this:
for www.mydomain.com:
RewriteRule ^/(.*)
http://IP:PORT/VirtualHostBase/http/www.mydomain.com:80/www/VirtualHostRoot/
$1
[L,P]

For folder.mydomain.com:
RewriteRule ^/(.*)
http://IP:PORT/VirtualHostBase/http/folder.mydomain.com:80/www/folder/Virtua
lHostRoot/$1
[L,P]

Any hints would be appreciated :-)

--
Gitte Wange
Technical Manager

Email: gitte at mmmanager.org
Web: http://www.mmmanager.org
Tlf: +45 36 46 20 02

I'd use a list comprehension instead of a map(lambda...)
if I thought it would get past Jim

    -- Steve Alexander: Zope-Dev mailing list
       In a patch for ZCatalog.


_______________________________________________
Zope-CMF maillist  -  Zope-CMF at zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

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




More information about the Zope-CMF mailing list