[HCoop-Help] Domtool mod_rewrite: rewriteCond for existent / non-existent files

Michal michalcharemza at gmail.com
Sun Apr 12 17:25:32 EDT 2009


On Sun, Apr 12, 2009 at 6:29 PM, Adam Chlipala <adamc at hcoop.net> wrote:
> You can run "domtool-admin describe YOURDOMAIN" to see the Apache
> configuration that is being generated.  If you can tell me what
> configuration you would like to generate but can't (with the literal
> configuration code, not a request for some behavior), I can add
> something new.  I'm not familiar with mod_rewrite details and can't help
> in any other way.

Looking at the apache configuration I couldn't see what was wrong.
However, after a bit of googling (which I should have done before
posting...) I found that %{REQUEST_FILENAME} is only relative to the
document root (if not used in a .htaccess file). So the following
actually seems to work to text against existence of a file:

rewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" "!-f" [];

A bit messy, but it does seem to work.



More information about the HCoop-Help mailing list