On Tue, 2002-05-14 at 11:33, Sam Brauer wrote:
> I just recently starting experimenting with WebKit, and I'm quite
> impressed. I'm hoping to port an app that currently runs on mod_python,
> but I'm running into a stumbling block. I need to be able to write a
> servlet (or some other type of object that can be executed by WebKit and
> persist in memory) that can be invoked indirectly by the webserver when
> files ending with a specific extension are requested.
> Specifically I'd like to be able to hit .xml files at any url on the
> server and have the request handled by this hypothetical servlet.
I haven't followed all of this thread, but the most expedient way to do
this will be with mod_rewrite. I believe you can do something like:
# This captures the translated filename in %1:
RewriteCond %{REQUEST_FILENAME} ^(.*)
# And this redirects it to your servlet:
RewriteRule \.xml$ /WK/YourContext/XMLHandlerServlet?file=%1 [QSA,L,PT]
Of course, this would make it possible for someone to process arbitrary
files on your server by calling XMLHandlerServlet directly. You might
want to add another rule to keep people from accessing XMLHandlerServlet
directly, like:
# Before the rules above, put in:
RewriteRule ^/WK/YourContext/XMLHandlerServlet /go-away.html [L]
(if YourContext is the default context, then you'll have to put in two
lines like this)
Ian
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss