[Zope] VHM/Apache Rewrite Rules

John Withers grayarea at reddagger.org
Sat Mar 20 12:17:56 EST 2004


Folks,

I am trying to use VHM and Apache rewrite rules together and have no
problems getting it working for various folders. However, I am finding
that I don't appear to be able to make this work for the root folder and
management console and am can't see in the docs why I can't do it.

If my zope server lives at the mythical myhouse.org:8080 what I want to
do is set up a VHM/rewrite that will allow http://myhouse.org/zope/ to
be equivalent to http://myhouse.org:8080/.

My first bright ideas were:
RewriteRule ^/zope(.*)
http://127.0.0.1:8080/VirtualHostBase/http/myhouse.org:80//VirtualHostRoot/zope/$1 [NC,P,L]

and 

RewriteRule ^/zope(.*)
http://127.0.0.1:8080/VirtualHostBase/http/myhouse.org:80/VirtualHostRoot/zope/$1 [NC,P,L]RewriteRule ^/zope(.*) 

Those produce a site error and resource not found page telling me the
resource not working is zope GET.

Bright idea number two was:
RewriteRule ^/zope/(.*)
http://127.0.0.1:8080/VirtualHostBase/http/myhouse.org:80/VirtualHostRoot//$1 [P,L]

which turns out to be equivalent in final effect to this attempt:
RewriteRule ^/zope/(.*)
http://127.0.0.1:8080/VirtualHostBase/http/myhouse.org:80/VirtualHostRoot/$1 [P,L]

Both of those hitting http://myhouse.org/zope/ produces the normal zope
quickstart page, but the link there to the management interface isn't
rewritten to include the /zope redirection (ie the link is to
http://myhouse.org/manage not the correct
http://myhouse.org/zope/manage). Trying to hit the management page
directly with http://myhouse.org/zope/manage brings up the frames for
the management page, but the actual content of those frames is all a
bunch of apache 404's.

This isn't mission critical by any means, since in practice it is just
another way of getting at myhouse.org:8080 and my redirects of things in
folders work fine, but I am curious if anyone can tell me why it doesn't
work and give me a fix.

John Withers











More information about the Zope mailing list