[Zope] apache rules with zope
Ricardo Newbery
ric at digitalmarbles.com
Fri Sep 4 19:41:32 EDT 2009
> ----- Original Message -----
> From: "Thomas Bennett" <bennetttm at appstate.edu>
>
>
>> I'm trying to serve the files on the underlying directories straight
>> through
>> apache with no zope interaction.
>>
>> My main site has all content on zope. I now have content also on the
>> filesystem I want to server without leaving the site. From
>> http://wiki.zope.org/zope2/ZopeAndApache I found I could supposedly
>> use a
>> rewrite condition to do such. So usiing the rewrite condition:
>>
>> RewriteCond %{REQUEST_URI} !^/(usage|zusage|ead2002|asu_ead)
>>
>> I thought would work. I have found why the usage and zusage
>> directories
>> work,
>> there is a usage and zusage directory on the zope system so it
>> hasn't been
>> using the file system at all for any of them.
>>
>> Below is the excerpt from wiki.zope.org that explains how to do this,
>> which
>> doesn't work for me.
>>
>> "A lot of site content is in Zope, some parts are served directly by
>> apache
>>
>> For this, we use the RewriteRule? where everything is inside Zope,
>> but
>> slap a
>> RewriteCond? in front of it:
>> RewriteCond %{REQUEST_URI} !^/(stats|manual|static_images)
>> RewriteRule ^(.*) \
>> http://127.0.0.1:8080/VirtualHostBase/\
>> http/%{SERVER_NAME}:80/www_example_com/VirtualHostRoot$1 [L,P]
>
Perhaps RewriteCond doesn't support the alternation syntax in the
conditional pattern. Not sure as I never use RewriteCond. Most cases
are easier written with just RewriteRules alone, like so:
RewriteRule ^/(stats|manual|static_images) - [L]
RewriteRule ^(.*) \
http://127.0.0.1:8080/VirtualHostBase/\
http/%{SERVER_NAME}:80/www_example_com/VirtualHostRoot$1 [P]
Ric
More information about the Zope
mailing list