I have a portion of a site which originally consisted of a single folder with content. In the reorganized site, this folder consists of a collection of folders. For specificity, the structure looks like +--A--+--A1 | +--A2 | +--A3 | Depending upon a parameter derivable from the HTTP_HOST name, I want either A1, A2, A3, or ... to behave as if it were A to all the other code in the site. Of course, A1,A2,... should be able to hold code and/or data. I would have though that some sort of local use of a VHM and or SiteAccess would allow this, but I've been unable to make it work. Any suggestions? hints?
I have a portion of a site which originally consisted of a single folder with content. In the reorganized site, this folder consists of a collection of folders. For specificity, the structure looks like
+--A--+--A1 | +--A2 | +--A3 |
Depending upon a parameter derivable from the HTTP_HOST name, I want either A1, A2, A3, or ... to behave as if it were A to all the other code in the site. Of course, A1,A2,... should be able to hold code and/or data.
I would have though that some sort of local use of a VHM and or SiteAccess would allow this, but I've been unable to make it work. Any suggestions? hints?
You'll probably have to end up doing this yourself, but maybe one of these would work: http://zope.org/Members/TheJester/PortableHole http://zope.org/Members/andym/Rewriter http://zope.org/Members/astaubo/Redirector At least they can give you a pointer on how to do the sort of proxying you want. I never was able to get Rewriter or Redirector to work (which is why I wrote the v. simple MovedObject) but maybe you'll have better luck. If you do it yourself, you will probably make A an instance of your own product which extends folder but over-writes the appropriate methods (traversal and call and whatnot) to make something called on it actually use its contents. I have to say, naturally, that this seems like a very strange thing to do, and I half suspect that there's a different design that will make things easier. But I'm sure you have your reasons. --jcc
Dennis Allison wrote at 2003-8-26 10:55 -0700:
I have a portion of a site which originally consisted of a single folder with content. In the reorganized site, this folder consists of a collection of folders. For specificity, the structure looks like
+--A--+--A1 | +--A2 | +--A3 |
Depending upon a parameter derivable from the HTTP_HOST name, I want either A1, A2, A3, or ... to behave as if it were A to all the other code in the site. Of course, A1,A2,... should be able to hold code and/or data.
I would have though that some sort of local use of a VHM and or SiteAccess would allow this, but I've been unable to make it work. Any suggestions? hints?
"SiteAccess" could easily handle HTTP requests. It would fail for attribute and "[un]restrictedTraverse" access. You will need deep magic to cheat for these cases. You could have a look at Shane's "Symlink" product (be carefull, it is dangerous, as it truely eliminates the distinction between linker and object) or at my "Reference" product. Both will need to be extended as they do not support variable destinations. But this part should be easy. Dieter
participants (3)
-
Dennis Allison -
Dieter Maurer -
J Cameron Cooper