Forum

Hiawatha with Zope

Garry
4 May 2009, 18:16
I am trying to use Hiawatha in front of Zope to provide ssl support but I am having difficulty working out the rewrite rules. I need to translate this:
RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/https/%{SERVER_NAME}:443/VirtualHostRoot/$1 [L,P]

Apache rewrite rule into Hiawatha, can anyone help?
Regards
Hugo Leisink
4 May 2009, 18:50
URL operations, like rewrites and redirects, in Hiawatha only work with the path part of the URL: everything from the third slash in the URL: http://hostname/path/part/of/url. So, the ${SERVER_NAME} can't be translated to a Hiawatha config version. You have to fill it in 'hard coded'.

UrlTookit {
ToolkitID = zope
Match ^/(.*) Redirect http://localhost:8080/VirtualHostBase/https/localhost:443/VirtualHostRoot/$1
}

VirtualHost {
Hostname = localhost
...
UseToolkit = zope
}
Garry
4 May 2009, 20:16
Thanks for the prompt reply, and the above does indeed redirect. However I need Hiawatha to act as a front so that request and response get piped through Hiawatha. Any idea how I would achieve this?
regards
Garry
4 May 2009, 20:56
Sorry it seems to work but the full URL from the redirect(including VirtualHostBase) is shown in the browser, will have to work out how to change it.
Thanks again
This topic has been closed.