[Zope] SiteRoot <base...> problem
Chris McDonough
chrism@zope.com
Tue, 20 Aug 2002 09:55:23 -0400
Eric,
The <base> tag insertion is not a side effect of VHM, it's Zope's
doing. I believe if you manually construct your URLs to "folderish"
things with a slash at the end of them e.g. "/some/folder/" instead
of "/some/folder", you will not see the base tag.
Alternately, you could write a small Access Rule which detects
whether the "published" object is a Folderish object
(object.isPrincipiaFolderish usually does the trick) and if the URL
doesn't end in a slash redirects the user's browser to one that
does.
- C
----- Original Message -----
From: "Eric van Riet Paap" <eric@quadgames.com>
To: <zope@zope.org>
Sent: Tuesday, August 20, 2002 9:42 AM
Subject: Re: [Zope] SiteRoot <base...> problem
> Just a quick reply to my own message to not waste other people
valuable
> time.
>
> It now works as it should! I found out that quadgames.nl was an
alias of
> quadgames.com in the Apache config file. I changed that so
quadgames.com
> and quadgames.nl can have different rewrite rules.
>
> The rewrite rule for the .nl domain is now;
> RewriteRule ^(.*)
>
/etc/Zope-2.5.1-linux2-x86/Zope.cgi/VirtualHostBase/http/www.quadgam
es.nl/
> www.quadgames.com/VirtualHostRoot/$1
> [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
>
> and for the .com domain:
> RewriteRule ^(.*)
>
/etc/Zope-2.5.1-linux2-x86/Zope.cgi/VirtualHostBase/http/www.quadgam
es.com/
> www.quadgames.com/VirtualHostRoot/$1
> [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
>
> When I now remove SiteRoot completely the correct domain name is
put
> into the <base href="...."> tag .
>
> One question remains: how do I get rid of this <base...> tag
insertion?
>
> - Eric
>
>
> On Tuesday, August 20, 2002, at 03:16 PM, Eric van Riet Paap
wrote:
>
> > Can the <base href=.....> tag insert in the <head> block be
disabled. I
> > think this is something of the VirtualHostMonster, but I don't
see why
> > I would want it and it gives me a problem that I don't know how
to
> > solve.
> >
> > I have a multiple language site called quadgames.com , which has
the
> > option to change language by linking to the current page with an
> > additional newlanguage=XX parameter. If a page is requested with
this
> > parameter than a session variable that stores the current
language is
> > modified. This works great! But now I added another site that
should
> > serve exactly the same content but with another default language
(the
> > site is called: quadgames.nl) . When Zope 'sees' that is a new
session
> > and no 'newlanguage' parameter is available then the default
language
> > is english (for the .com domain) and dutch (for the .nl domain).
Great:
> > this should actualy work if it wasn't for the fact that when the
user
> > selects a link (href/picture) the <base...> tag makes that all
links
> > refer to either the ipadress of the server or the .com or the
.nl
> > domain (whichever I select in SiteRoot). And when the user goes
to the
> > other domain it looks (this what I think happens) as if the
session
> > info is no longer valid (because we are on another domain now?)
and the
> > incorrect language is selected.
> >
> > I could make all links absolute but I don't want to be forced to
do
> > this!
> >
> > Does anyone uncerstand what I mean and is there a solution to my
> > problem?
> >
> > kind regards,
> > Eric
> >
> > _______________________________________________
> > Zope maillist - Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > ** No cross posts or HTML encoding! **
> > (Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope-dev )
> >
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>