[Zope] URL Rewriting chaos

Tino Wildenhain tino at wildenhain.de
Tue Nov 1 08:08:14 EST 2005


Am Dienstag, den 01.11.2005, 08:38 +0000 schrieb zope at tropolinux.com:
> Hi,
> I've tried everything in both the Zope and Plone books and read the Apache 
> URL Rewrite guide also, but I just can't seem to get the silly thing 
> working!
> I'm sure that it does ;-) but for some reason it is beyond me.
> Let me tell you what I've tried, and tell me which one should work:
> I am using apache to rewrite the urls. 
> 
> 1. Host monsters, both one in the zope root folder, and multiple in each 
> plone site's folders.  I have tried both with the mappings and without (even 
> though the books say they're not needed with apache). 

Maybe this can screw things even more. I think we should remove the 
ability to add more VHM instances once one is there (and with recent
zopes you already have it on install in the root)

> 2. apache rewrite rules, this is how (the current attempt looks)
> please assume that the big url is all on one line, email programs may have 
> changed that. 
> 
> <VirtualHost *:80>
>    ServerName example.net
>    RewriteEngine On
>    RewriteRule ^/(.*) 
> http://example.net:8080/plone_site/VirtualHostBase/http/example.net:80/Virtu 
> alHostRoot/$1 [L,P]
> </VirtualHost> 
> 
> I have tried all combinations of things in the 'example.net' places above, 
> including the fqdn, local ip number and local host name. 

The VHM management tab has all the info you need. In fact, the example
there is:

http://localhost:8080/VirtualHostBase/http/www.buystuff.com:80/buystuff.com/VirtualHostRoot/$1

Which would translate to:

http://server-your-zope-runs:8080/VirtualHostBase/http/example.net:80/plone_site/VirtualHostRoot/$1

Make sure you have only one VHM object and it in your site root.

> Is there a shortcoming in the documentation here?  Have I accidentally 
> skipped over a word somewhere that was more important than I realised? 

I suspect there is a bit confusing documentation out there which isnt in
sync with the current implementation. In case of the VHM its quite good
documented in its management tab. Maybe we should uinify the places 
where one can find up to date documentation.



More information about the Zope mailing list