httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Millaway, John" <John_Milla...@ghrsystems.com>
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
Hi,

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

-John

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message