[Zope] Apache, VirtualHostMonster and complex rewriterule
Gilles Lenfant
gilles@pilotsystems.net
Fri, 24 Jan 2003 20:47:41 +0100
Hi,
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
Can somebody help ? What's wrong in the RewriteRule pattern ?
Many thanks in advance.
--Gilles