home contents changes options help subscribe

A useful ZopeProduct, included with Zope, that helps you rewrite urls, set up virtual hosts and change the way a site is accessed.

See the documentation at http://docs.zope.org/zope2/zope2book/VirtualHosting.html . Here is a quick overview: SiteAccess provides

  • the VirtualHostMonster object. A new zope instance has one of these in the root folder (/virtual_hosting). Any requests that it sees for urls with a special format get rewritten. You configure apache or another front-end webserver to provide these special urls.

  • the AccessRule and SiteRoot objects. These let you configure special processing for particular urls, similar to apache's mod_rewrite, but all within zope, no front-end webserver needed. Most folks won't need to use these.

    You can lock yourself out of your site with these, here's how to recover:

    • If your misbehaving access rule is in http://example.com/folder/, you can get in with http://example.com/folder/_SUPPRESS_ACCESSRULE/manage_main. Similarly, to bypass a site root object that lives in http://example.com/ use http://example.com/_SUPPRESS_SITEROOT/manage_main.
    • Or, restart zope with suppress-all-access-rules on or suppress-all-site-roots on in zope.conf.

Resources: