On Wed, Apr 02, 2003 at 08:59:14PM +0200, Dieter Maurer wrote:
Steffen Hausmann wrote at 2003-4-2 18:05 +0200:
I'm having trouble with the apache RewriteRule.
I'm using Zope 2.6.0 on a SuSE linux and the following RewriteRule works perfect with the site I developed.
RewriteRule ^/(.*) http://127.0.0.1:8070/VirtualHostBase/https/foo.bar:443/VirtualHostRoot/$1 [L,P]
The problem ist, that the folder in which the site is contained in is called /brk and I don't want to access the site via foo.bar/brk. Therefore I changed the RewriteRule into
[...]/VirtualHostBase/https/foo.bar:443/brk/VirtualHostRoot/$1 [L,P]
This seemed to work until I discovered that parts of the site (which use a catalog that is contained in the /brk folder named brkCatalog) don't work anymore.
E.g. the funktion manage_afterAdd (which works perfect with the old rule) raises an AttributeError.
manage_afterAdd(self, item, container): [...] self.brkCatalog.reindexIndex('publishDate', REQUEST=None)
AttributeError: 'None' object has no attribute 'script'
Thus, pass in a real "REQUEST" rather than "None". You can use "self.REQUEST".
That works, but there is another Problem, with another function. getItem(self, metaType, verband, REQUEST=None): for object in self.brkCatalog({'meta_type':metaType}): path = re.match("(.*)/edit/.+?/.+?", object.getObject().absolute_url()) The request that is passed to the funktion by a dtml-in call looks ok (it is not None), but another AttributeError occurs. AttributeError: 'None' object has no attribute 'absolute_url' * Module DocumentTemplate.DT_Util, line 201, in eval __traceback_info__: REQUEST * Module <string>, line 0, in ? * Module Products.Hauptverwaltung.Hilfsklasse, line 398, in * getItem This does also work with the old RewriteRule. Thanks. MfG Steffen -- That you're not paranoid doesn't mean they aren't right behind you.