On Tue, 19 Dec 2000, Marcin Kasperski wrote:
> Partial solution: at something like 2:00 AM delete your SiteRoot rule,
> reindex with ZCatalog and create this rule again. Searching works
> (although I needed to edit the paths found a bit in the form responsilbe
> for search results presentation).

You don't need to delete your SiteRoot. You can use one of techniques
described in SiteRoot docs to suppress it within particular request.
I use trick with phantom folder, call it 'Z'.
So my AccessRule looks like:

Is there a path, and does it start with 'Z'?
<dtml-let stack="REQUEST['TraversalRequestNameStack']">
 <dtml-if "stack and stack[-1]=='Z'">
  Get rid of 'Z':     <dtml-call "stack.pop()">
  Put it back logically: <dtml-call "REQUEST.setVirtualRoot('Z')">

Is the first-level domain 'hotsite.com'? Ignore sub-domains and port
<dtml-if "_.string.split(_.string.lower(_.string.split(HTTP_HOST,
':')[0]), '.')[-2:]==_.string.split('www.hotsite.com','.')[-2:]">
 Add physical root: 
 <dtml-call "REQUEST['TraversalRequestNameStack'].append('hotsite')">
 <dtml-call "REQUEST.set('SiteRootPATH','/')">


In my SiteRoot, I have all properties left blank.

When I access my server using URL like www.myserver.com/Z/something, then
SiteRoot is turned off.

With this solution, your site may be still accessible to customers, while
you are working without SiteRoot (i.e. cataloging objects).


| `long long long' is too long for GCC |

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to