Hi..

I'm using Apache 2.2 with mod_proxy_balancer right
now to run a dynamic RESTful application. This app
caches requests in the Apache DocumentRoot, so a
request can be handled by Apache, once generated.

Right now I'm checking my requests via mod_proxy.
If the file does not exist in the DocumentRoot, it will
get forwarded to the ProxyBalancer:

RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://some_proxy%{REQUEST_URI} [P,QSA,L]

This works fine. But this won't handle content
negotiations. I'm caching the files in the recommended
format "name.lang.format". So my cached files might
be "index.en.html" or "foo.fr.xml".

The MultiView Option allows content negotiation, but
it obviously won't change the REQUEST_FILENAME,
so my rewrite rule will always be true, whenever someone
requests "index.html", but my cache just has a "index.en.html".
I'm not even sure content negotiation will take place,
if i have a RewriteRule.

If i remove the RewriteRule, content negotiation works
as expected.

But I need the RewriteRule to handle all requests,
that has not been cached yet. It would be great to
use the balancer as a ErrorDocument handler, but
unfortunately, that doesn't work.

Is there a way to solve this problem, by either:
- only rewrite, if the document cannot be found
in the DocumentRoot (including content
negotiation)
- use a balancer as a error-handler, if no file could
be found after content negotiation.

Cheers,
 Ben


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to