On Tue, Apr 16, 2002 at 05:45:56PM +0200, David Eriksson wrote:
> Hi,
>
> I'm looking for the optimal way of configuring
> Apache to run Webware servlets directly under
> the website document root.
>
> There is one way of doing it here
> http://webware.colorstudy.net/twiki/bin/view/Webware/ModRewriteRecipes
>
>
> But just changing the location from "<Location /WK>"
> works fine for me.
>
> <Location />
> WKServer localhost 8086
> SetHandler webkit-handler
> </Location>
>
> Now I just want to specify - say two directories for
> static content that should override the above setting.
> (/Graphics /Downloads)
>
>
> Any tips how to best config apache to do this!?
The way I do it is to leave the Webware directory as <Location /WK>,
then rewrite the static URLs to their original URLs, and everything else
into /WK.
Here I use /WW for the Webware directory, and the static directories are
/images, /pix/images and /pix/images/thumbs .
1 RewriteRule ^/images(.*) - [L]
2 RewriteRule ^/pix/(images|thumbs)/(.*) - [L]
3 RewriteRule ^/WW($|/.*) - [L]
4 RewriteRule ^/(.*) /WW/$1 [L,PT]
The "L" is necessary on all rules except 4, to prevent 4 from executing.
"PT" is necessary on 4, or WebKit won't get the request.
3 prevents /WW/index.py from being rewritten to /WW/WW/index.py .
I don't think you can leave WebKit at / and make certain subdirectories
static. If you could, it would be a matter of
<Location /images>
SetHandler apache-core-default-handler
</Location>
but I don't know how you can change the handler back to the default once
it's been set to something else.
(Added to the wiki at
http://webware.colorstudy.net/twiki/bin/view/Webware/ModRewriteRecipes )
--
-Mike (Iron) Orr, [EMAIL PROTECTED] (if mail problems: [EMAIL PROTECTED])
http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss