[Zope] Apache, VirtualHostMonster and complex rewriterule
Gilles Lenfant
gilles@pilotsystems.net
Mon, 27 Jan 2003 16:51:54 +0100
----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Gilles Lenfant" <gilles@pilotsystems.net>
Cc: <zope@zope.org>
Sent: Sunday, January 26, 2003 7:39 PM
Subject: Re: [Zope] Apache, VirtualHostMonster and complex rewriterule
> Gilles Lenfant wrote at 2003-1-24 20:47 +0100:
> > I'm trying to make some complex RewriteRule to map :
> >
> > http://nick1.mydomain.com/pathx -> Zope /nick1/pathx
> >
> > http://nick2.mydomain.com/pathy -> Zope: /nick2/pathy
> >
> > ...
> >
> > I thought I had some skills in that matter but...
> >
> > <VirtualHost *>
> > ServerName *.mydomain.com
> > RewriteEngine on
> > RewriteRule ^(.*)\.mydomain\.com/(.*)
> >
http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/$1/VirtualHostRoo
> > t/$2 [P,L]
> > </VirtualHost>
> >
> > ... doesn't work
> >
> > I inspected the Z2.log and found that the second group matches when the
> > first does'nt :
> > When getting http://foo.mydomain.com/bar , the path in Z2.log is :
> >
> > /VirtualHostBase/http/foo.mydomain.com:80//VirtualHostRoot/bar
> >
> > ...when I expected...
> >
> > /VirtualHostBase/http/foo.mydomain.com:80/foo/VirtualHostRoot/bar
> Add rewrite logging and lock at the log file.
>
>
> Dieter
Thanks Dieter,
With the rewritelog, I can see that the regular expression searches matches
in the *path* and not to the *URL* (as stated in mod_rewrite doc). Such it
wont pass anything to the expected $1 and $2 :(
I got to find out another way to virtualhost dynamically.
--Gilles