[Zope3-Users] Re: How to configure zope to map ~foo to foo/public_html?

Philipp von Weitershausen philipp at weitershausen.de
Thu Jun 5 05:12:48 EDT 2008

Philip Johnson wrote:
> Greetings,
> I am a Plone/Zope newbie who is redesigning my old traditional 
> apache-style website to use Plone 3/Zope 3.  This has been a delightful 
> process in general.
> Though I am content to have most of my old URLs become invalid, I would 
> like to retain my current user directories.
> Is there some simple way to configure Zope such that URLs like 
> http://www.example.org/~foo/index.html are mapped to the user foo's 
> public_html/index.html file?
> I have spent about an hour googling around and remain confused.

The recommended practice is to run Apache in front of Zope and use 
mod_rewrite + mod_proxy to route all or most requests to Zope. With 
mod_rewrite you could then also exclude certain URLs to be forwarded to 
Zope so that they're handled locally by Apache, e.g.:

   RewriteEngine On
   RewriteRule ^/files/ - [L]     # handle /files URLs locally
   RewriteRule ^~ - [L]           # handle ~... URLs locally
   # everything else goes to Zope running on localhost:8080
   RewriteRule ^/(.*) 
http://localhost:8080/++vh++http:%{SERVER_NAME}:80/++/$1 [P,L]

More information about the Zope3-users mailing list