You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/06/25 23:05:39 UTC

DO NOT REPLY [Bug 45280] New: REQUEST_FILENAME is not full local filesystem path

https://issues.apache.org/bugzilla/show_bug.cgi?id=45280

           Summary: REQUEST_FILENAME  is not full local filesystem path
           Product: Apache httpd-2
           Version: 2.2.8
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: edwin@bitstorm.nl
                CC: rse@apache.org


According to the documentation on
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html, the variable
REQUEST_FILENAME is the full local filesystem path:

"REQUEST_FILENAME 
The full local filesystem path to the file or script matching the request."

This seems not to be the case.

It seems the variable should be prefixed with DOCUMENT_ROOT to get the full
path.

Examples:
This does not trigger the rule:
RewriteCond %{REQUEST_FILENAME} -s

But this does:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -s

Please update the documentation or the implementation.

I lost several hours over this and I guess I'm not the only one.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 45280] REQUEST_FILENAME is not full local filesystem path

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45280


Bob Ionescu <bo...@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




--- Comment #2 from Bob Ionescu <bo...@googlemail.com>  2008-12-14 05:38:52 PST ---


*** This bug has been marked as a duplicate of bug 16402 ***


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 45280] REQUEST_FILENAME is not full local filesystem path

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45280





--- Comment #1 from Bob Ionescu <bo...@googlemail.com>  2008-08-14 02:56:18 PST ---
The value of REQUEST_FILENAME depends upon context. It contains the full
physical path only, if the request has already been mapped to the file system
(-> directory context). That's not the case if you're using mod_rewrite in
per-server context – you're still on uri-level. The full physical path is
simply unknown in this state of processing.
To get the full physical path in server-context, you'll need an internal
sub-request (%LA-U or %LA-F). Prefixing with document_root is not a solution,
because this may not be the physical path at the end (think about aliases,
mod_userdir etc.).

May be the docs should state that more clearly, but not the quoted 1.3 ones.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org