httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Millaway, John" <>
Subject [users@httpd] Is mod_rewrite REQUEST_FILENAME a full path or relative to docume nt root?
Date Mon, 13 Oct 2003 15:17:51 GMT

The docs for RewriteCond say REQUEST_FILENAME is, "the full local filesystem
path to the file or script matching the request." However, according to the
mod_rewrite logs, REQUEST_FILENAME is relative to the document root.  To
make it more confusing, some examples in the rewrite guide use filesystem
tests (-f and -d) on REQUEST_FILENAME by itself, while other examples prefix
REQUEST_FILENAME with an absolute physical. Is REQUEST_FILENAME a full
filesystem path or not?

Various snippets from the rewrite guide:

    RewriteCond    %{REQUEST_FILENAME}  -d
    RewriteCond    /your/docroot/dir1/%{REQUEST_FILENAME}  -f
    RewriteCond    /your/docroot/%{REQUEST_FILENAME} !-f
    RewriteCond   %{REQUEST_FILENAME}   !-f
    RewriteCond   %{REQUEST_FILENAME}   !-s


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message