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 2007/09/14 12:29:13 UTC

DO NOT REPLY [Bug 43395] New: - RewriteRule and Location or Directory does not work

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=43395>.
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=43395

           Summary: RewriteRule and Location or Directory does not work
           Product: Apache httpd-2
           Version: 2.2.4
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: kevin.richter@uni-hildesheim.de


In the manual you write:
"Although rewrite rules are syntactically permitted in <Location> sections, this
should never be necessary and is unsupported."

But it is important in case of reverse proxies, where <Directory> cannot be
used: The directory does not exist.

In my case there is following RewriteRule:
RewriteRule     ^/foo/(.*)$ \
                http://int3z01:5010/foo/$1 \
                [P,L]

It works perfectly when used alone in the httpd.conf
But I have to set a ModSecurity option for /foo.
So I tried:

<Location /foo>
  SecRequestBodyLimit 104857600
  
  RewriteRule   ^/(.*)$ \
                http://int3z01:5010/foo/$1 \
                [P,L]
</Location>

Did not work.

My DocumentRoot is /data/web.
I created /data/web/foo and tried:

<Directory /data/web/foo>
  SecRequestBodyLimit 104857600
  
  RewriteRule   ^/(.*)$ \
                http://int3z01:5010/foo/$1 \
                [P,L]
</Directory>

Did not work either.

The error is:
File does not exist: /data/web/foo/index.php

Yes, index.php does not exist, because the RewriteRule should get it from the
internal server.


Are there any ideas?


Thanks,
Kevin

-- 
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 43395] - RewriteRule and Location or Directory does not work

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=43395>.
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=43395


slive@apache.org changed:

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




------- Additional Comments From slive@apache.org  2007-09-14 06:29 -------
This question would have been better on a user-support forum like the
users@httpd.apache.org mailing list.

You don't need to put the RewriteRule in the same context as the
SecRequestBodyLimit directive. You can put the latter in the <Location> (or
perhaps <Proxy>) section while keeping the former in the main server context.


-- 
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