[Zope3-dev] State of Virtual Hosting
Marius Gedminas
mgedmin@centras.lt
Tue, 29 Jul 2003 12:32:44 +0300
--KN5l+BnMqAQyZLvT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Jul 28, 2003 at 10:46:03PM -0600, Jeffrey P Shell wrote:
> On Monday, July 28, 2003, at 10:48 AM, Marcus J. Ertl wrote:
>=20
> >Am Mon, 2003-07-28 um 17.16 schrieb Marius Gedminas:
> >
> >Hello!
> >
> >> RewriteRule ^/zope3-checkins(/?.*) =20
> >>http://localhost:3080/zope3-checkins/++vh++http:www.codeworks.lt:80/=20
> >>zope3-checkins/++$1 [P,L]
> >
> >These are my rewrite rule (one per line):
> >
> > ProxyVia On
> > RewriteEngine On
> > RewriteRule ^/zope3$ /zope3/ [R=3D302]
> > RewriteRule ^/zope3/(.*)
> >http://localhost:9080/++vh++https:tiran.faho.rwth-aachen.de:7443/++/$1
> >[L,P]
> >
> >Seems to work, because I can see the zope page, if I browse to
> >http://tiran.faho.rwth-aachen.de/zope3/, but without css and images.
> >Zope doesn't change all the links inside the page from localhost:9080 =
=20
> >to
> >the trian....-url.
>=20
> I still don't understand all the bloody ++'s. Is there some different =
=20
> behavior between ending something with ``++$1`` and ``++/$1``? Or is =
=20
> that between @@foo and @@/foo ?
In my example $1 is supposed to be empty or start with a /, so it ends
up being /++/ anyway. (I've just realized /?.* matches nonempty strings
that do not start with a / as well. Oops.)
Normally in Zope 3 the ++ signifies a namespace, which means that a path
element will be treated specially, e.g.
/foo/bar/++view++baz/
In example 'baz' will be treated as a view name even if bar contains an
item named 'baz'. (@@ is a shortcut for ++view++; /@@/ is just a view
with an empty name.)
In the vhosting case the last /++/ is just a marker separating virtual
path elements that will be prepended to all generated links and real
path elements that will be traversed to find the object to publish.
I was sure there was a file in the Zope 3 tree documenting it, but I
cannot find it. You can also find documentation at
http://dev.zope.org/Zope3/VirtualHosting
Marius Gedminas
--=20
Alan Turing thought about criteria to settle the question of whether
machines can think, a question of which we now know that it is about
as relevant as the question of whether submarines can swim.
-- Dijkstra
--KN5l+BnMqAQyZLvT
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/Jj88kVdEXeem148RAkCUAJ9qx9F523Zpxh6QoY9ORFidPp95TwCdHS6d
bnn0d/kUtvoodDtrX/0kASk=
=dKdD
-----END PGP SIGNATURE-----
--KN5l+BnMqAQyZLvT--