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 2006/05/24 09:47:26 UTC
DO NOT REPLY [Bug 39650] New: - mod_rewrite uses physical path if one exists in Linux
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39650>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39650
Summary: mod_rewrite uses physical path if one exists in Linux
Product: Apache httpd-2
Version: 2.0.54
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_rewrite
AssignedTo: bugs@httpd.apache.org
ReportedBy: krishna@changepond.com
mod_rewrite seems to use the physical path if it exists instead of appending
the document root to the rewritten URI.
To simulate:
Consider this rewrite rule
RewriteRule ^/Images/(.*) /lib/Images/$1
Even if you have a lib/Images uder your Docroot, the path is resolved to the
physical path of /lib/Images/ and image serving fails.
192.168.50.209 - - [24/May/2006:11:04:11 +051800] [192.168.50.9/sid#81168c0]
[rid#81afac8/initial] (2) local path result: /lib/Images/logo.jpg
192.168.50.209 - - [24/May/2006:11:04:11 +051800] [192.168.50.9/sid#81168c0]
[rid#81afac8/initial] (1) go-ahead with /lib/Images/logo.jpg [OK]
This should actually be <docroot>/lib/Images/logo.jpg
Incidentally, the same Rewrite rule works fine in Windows. This has probably to
do with the non-existance of /lib physical path in the Windows environment
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 39650] - mod_rewrite uses physical path if one exists in Linux
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39650>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39650
------- Additional Comments From robsiegen@googlemail.com 2006-05-24 09:05 -------
This is not a bug, this is intention so that mod_rewrite can act in per-serever
context like an alias. To avoid such a filename-translation (and to keep the
result as an URL-path), you must use the PT-Flag.
That's how mod_rewrite is expected to work.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 39650] - mod_rewrite uses physical path if one exists in Linux
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39650>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39650
slive@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From slive@apache.org 2006-05-24 13:45 -------
That's not the point. What Robert meant is that RewriteRule can act as an Alias
itself, providing access to content outside the documentroot. The way this
feature is handled (silently guessing about the users intentions based on the
contents of the filesystem) is a little tricky, but it is not going to change at
this point.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 39650] - mod_rewrite uses physical path if one exists in Linux
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39650>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39650
------- Additional Comments From krishna@changepond.com 2006-05-24 10:06 -------
Thank you for the update. I just went through the source and saw the notice
that describes this. But, I was just wondering whether it is not possible to
check whether any such Alias exists and if not prefix the URI with DocumentRoot.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 39650] - mod_rewrite uses physical path if one exists in Linux
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39650>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39650
------- Additional Comments From krishna@changepond.com 2006-05-24 07:52 -------
As a workaround having PT on the rewrite rule makes it work fine.
RewriteRule ^/Images/(.*) /lib/Images/$1 [PT]
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org