[Zope] Apache mod_rewrite module...

mindlace mindlace@digicool.com
Mon, 22 May 2000 12:56:11 -0600


Pierre Rougier wrote:
> 
> The problem is that by doing that, as in the HTML pages, paths are
> relatives, the redirection change all the relative address to the port 8080
> (because the final served URL is on this port), and I want my Images to be
> served by apache....

What I think you need to do is use SiteAccess so that it strips out the
port.  You can use an access rule like so:
<dtml-let basename="_.string.join(_.string.split(HTTP_HOST,
':')[-2:-1])">
  <dtml-call "REQUEST.set('SiteRootBASE','http://'+basename)">
</dtml-let>

Then, zope will generate all its links with a base that excludes the
port, so Apache will always get the request and apply its rewrite
rules.  You have to do this, because zope always adds a base url tag to
pages, so relative URL's think they go to zope.

Hope that helps,

--
ethan mindlace fremen
Zopista Community Liason